Hola!
Bueno, con este código podéis hacer una página de presentación de vuestra web usando JavaScript, este es el código:
Las primeras frases en rojo lo podéis modificar, lo que empieza por splashmessage= significa que es un texto que pondrá en la presentación, esta se dividirá en varias páginas, que se numeran en donde pone la X que está entre , si quieres añadir una más sólo pones splashmessage[SIGUIENTE NUMERO AL ANTERIOR]=', y si quieres borrar sólo borras esa línea.
Cuando lo probéis veréis de que hablo jeje
Un saludo!
Bueno, con este código podéis hacer una página de presentación de vuestra web usando JavaScript, este es el código:
<div id="splashcontainer" style="position:absolute;width:350px;"></div>
<layer id="splashcontainerns" width=450></layer>
<script>
var intervals=2000
var targetdestination="[COLOR="red"]URL DE TU PÁGINA[/COLOR]"
var splashmessage=new Array()
var openingtags='<font face="Arial" size="5">'
splashmessage[0]='[COLOR="red"]ComoCrearTuWeb.com[/COLOR]'
splashmessage[1]='[COLOR="red"]Esto es un script enviado a ComoCrearTuWeb.com[/COLOR]'
splashmessage[2]='[COLOR="red"]Cursos HTML, CSS, PHP, MySQL...[/COLOR]'
splashmessage[3]='[COLOR="red"]Y mucho más[/COLOR]'
splashmessage[4]='[COLOR="red"]Todo en ComoCrearTuWeb.com[/COLOR]'
splashmessage[5]='[COLOR="red"]Espera unos segundos...[/COLOR]'
var closingtags='</font>'
var i=0
var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var theimages=new Array()
if (document.images){
for (p=0;p<preloadimages.length;p++){
theimages[p]=new Image()
theimages[p].src=preloadimages[p]
}
}
function displaysplash(){
if (i<splashmessage.length){
sc_cross.style.visibility="hidden"
sc_cross.innerHTML='<b><center>'+openingtags+splashmessage[i]+closingtags+'</center></b>'
sc_cross.style.left=ns6?parseInt(window.pageXOffset)+parseInt(window.innerWidth)/2-parseInt(sc_cross.style.width)/2 : document.body.scrollLeft+document.body.clientWidth/2-parseInt(sc_cross.style.width)/2
sc_cross.style.top=ns6?parseInt(window.pageYOffset)+parseInt(window.innerHeight)/2-sc_cross.offsetHeight/2 : document.body.scrollTop+document.body.clientHeight/2-sc_cross.offsetHeight/2
sc_cross.style.visibility="visible"
i++
}
else{
window.location=targetdestination
return
}
setTimeout("displaysplash()",intervals)
}
function displaysplash_ns(){
if (i<splashmessage.length){
sc_ns.visibility="hide"
sc_ns.document.write('<b>'+openingtags+splashmessage[i]+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 (ie4||ns6){
sc_cross=ns6?document.getElementById("splashcontainer"):document.all.splashcontainer
displaysplash()
}
else if (ns4){
sc_ns=document.splashcontainerns
sc_ns.visibility="show"
displaysplash_ns()
}
else
window.location=targetdestination
}
window.onload=positionsplashcontainer
</script>
<div align="right">
<table border="0" width="200" height="100%" cellspacing="0" cellpadding="0">
<td width="100%" valign="bottom" align="right">
[ <a href="[COLOR="red"]DIRECCIÓN DE TU PÁGINA[/COLOR]"><font color="#FFFFFF">Saltar Intro</font></a> ]
</td>
</table>
</div>Las primeras frases en rojo lo podéis modificar, lo que empieza por splashmessage= significa que es un texto que pondrá en la presentación, esta se dividirá en varias páginas, que se numeran en donde pone la X que está entre , si quieres añadir una más sólo pones splashmessage[SIGUIENTE NUMERO AL ANTERIOR]=', y si quieres borrar sólo borras esa línea.
Cuando lo probéis veréis de que hablo jeje
Un saludo!