Ir para conteúdo
Fórum Script Brasil
  • 0

Como Faço Para A Página Carregar De Uma Vez


Guest - xandrre -

Pergunta

10 respostass a esta questão

Posts Recomendados

  • 0

vê se isso resolve

<div id="splashcontainer" style="position:absolute;width:700; left: 380px"></div>

<layer id="splashcontainerns" width=790 height="19" left="396"></layer>

<script>

var intervals=250

var targetdestination="http://www.sue_site.com.br"

var splashmessage=new Array()

var openingtags='<font face="Verdana" size="1" color=#333333><b>'

splashmessage[0]="carregando . 5%"

splashmessage[1]="carregando .. 10%"

splashmessage[2]="carregando ... 15%"

splashmessage[3]="carregando .... 20%"

splashmessage[4]="carregando ..... 25%"

splashmessage[5]="carregando ...... 30%"

splashmessage[6]="carregando ....... 35%"

splashmessage[7]="carregando ........ 40%"

splashmessage[8]="carregando ......... 45%"

splashmessage[9]="carregando .......... 50%"

splashmessage[10]="carregando ........... 55%"

splashmessage[11]="carregando ............ 60%"

splashmessage[12]="carregando ............. 65%"

splashmessage[13]="carregando .............. 70%"

splashmessage[14]="carregando ............... 75%"

splashmessage[15]="carregando ................ 80%"

splashmessage[16]="carregando ................. 85%"

splashmessage[17]="carregando .................. 90%"

splashmessage[18]="carregando ................... 95%"

splashmessage[19]="carregando .................... 100%"

var closingtags='</font>'

var i=0

function displaysplash_ie(){

if (i<splashmessage.length){

sc_ie.style.visibility="hidden"

sc_ie.innerHTML='<b><center>'+openingtags+splashmessage+closingtags+'</center></b>'

sc_ie.style.top=document.body.scrollTop+document.body.clientHeight/2-sc_ie.offsetHeight/2

sc_ie.style.visibility="visible"

i++

}

else{

window.location=targetdestination

return

}

setTimeout("displaysplash_ie()",intervals)

}

function displaysplash_ns(){

if (i<splashmessage.length){

sc_ns.visibility="hide"

sc_ns.document.write('<b>'+openingtags+splashmessage+closingtags+'</b>')

sc_ns.document.close()

sc_ns.left=pageXOffset+window.innerWidth/2-sc_ns.document.width/2

sc_ns.top=pageYOffset+window.innerHeight/2-sc_ns.document.height/2

sc_ns.visibility="show"

i++

}

else{

window.location=targetdestination

return

}

setTimeout("displaysplash_ns()",intervals)

}

function positionsplashcontainer(){

if (document.all){

sc_ie=document.all.splashcontainer

sc_ie.style.left=document.body.scrollLeft+document.body.clientWidth/2-sc_ie.offsetWidth/2

sc_ie.style.top=document.body.scrollTop+document.body.clientHeight/2-sc_ie.offsetHeight/2

displaysplash_ie()

}

else if (document.layers){

sc_ns=document.splashcontainerns

sc_ns.left=pageXOffset+window.innerWidth/2-sc_ns.document.width/2

sc_ns.top=pageYOffset+window.innerHeight/2-sc_ns.document.height/2

sc_ns.visibility="show"

displaysplash_ns()

}

else

window.location=targetdestination

}

window.onload=positionsplashcontainer

</script>

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...