-
come faccio a fare una pagina che al suo caricamento dopo poki secondi manda ad un'altra pagina... per es ho un sito ke non uso +... ma le persone cmq conoscono quell'indirizzo e non il nuovo, come faccio a far si ke ki va sul vekkio venga subito reindirizzato automaticamente al nuovo??
grazie ciao!!
-
Esiste il meta tag refresh che permette di fare ciņ. Fai una ricerca su google, dai...
-
tra gli head metti:
[code:1:966d9b2d5e]<META http-equiv="refresh" content="3; url=urlchetiserve.estensione">[/code:1:966d9b2d5e]
mettendo al posto di 3 il numero di secondi che vuoi tu
-
-
<html>
<head>
<head>
<style>
<!--
#bar, #barbackground{
position:absolute;
left:0;
top:0;
background-color:blue;
}
#barbackground{
background-color:white;
}
-->
</style>
<script language="JavaScript1.2">
var duration=5;
var message = "Entrerai nel sito tra " + duration + " secondi";
var font_size = 3;
var font_face = "verdana";
var NS6redirection = "qui metti l'url del tuo sito";
var bar_width = 200;
var bar_height = 15;
var centered = (screen.width) ? (screen.width-bar_width)/2 : 0;
function postaction(){
window.location="qui metti l'url del tuo sito"
}
var clipright=0
var widthIE=0
var widthNS=0
function initializebar(){
if (document.all){
baranchor.style.visibility="visible"
widthIE=bar.style.pixelWidth
startIE=setInterval("increaseIE()",50)
}
if (document.layers){
widthNS=document.baranchorNS.document.barbackgroun dNS.clip.width
document.baranchorNS.document.barNS.clip.right=0
document.baranchorNS.visibility="show"
startNS=setInterval("increaseNS()",50)
}
}
function increaseIE(){
bar.style.clip="rect(0 "+clipright+" auto 0)"
window.status="Attendere..."
if (clipright<widthIE)
clipright=clipright+(widthIE/(duration*20))
else{
window.status=''
clearInterval(startIE)
postaction()
}
}
function increaseNS(){
if (clipright<202){
window.status="Attendere..."
document.baranchorNS.document.barNS.clip.right=cli pright
clipright=clipright+(widthNS/(duration*20))
}
else{
window.status=''
clearInterval(startNS)
postaction()
}
}
window.onload=initializebar
</script>
</head>
<body>
<br>
<br>
<center>
<script language="JavaScript1.2">
if(document.layers){
document.write('<font size='+font_size+' face="'+font_face+'">' +message+ '</font><br>');
document.write('<ilayer name="baranchorNS" visibility="hide" width='+bar_width+' height='+bar_height+'>')
document.write('<layer name="barbackgroundNS" bgcolor=black width='+bar_width+' height='+bar_height+' z-index=10 left='+centered+' top=0></layer>')
document.write('<layer name="barNS" bgcolor=blue width='+bar_width+' height='+bar_height+' z-index=11 left='+centered+' top=0></layer>')
document.write('</ilayer>')
}
else if (document.all){
document.write('<font size='+font_size+' face="'+font_face+'">' +message+ '</font>');
document.write('<div id="baranchor" style="position:relative;width:'+bar_width+'px;hei ght:'+bar_height+'px;visibility:hidden;">')
document.write('<div id="barbackground" style="width:'+bar_width+'px;height:'+bar_height+' px;z-index:9"></div>')
document.write('<div id="bar" style="width:'+bar_width+'px;height:'+bar_height+' px;z-index:10"></div>')
document.write('</div>')
}
else if (document.getElementById){
document.write('<font size='+font_size+' face="'+font_face+'">' +message+ '</font>');
document.write('<META http-equiv="REFRESH" CONTENT="'+duration+';URL='+NS6redirection+'">' )
}
</script>
</center>
</body>
</html>
inserisci l'url del tuo sito dove scritto e salva come pagina html speriamo ti vada bene
-
un po' lungo come javascript, sei sicuro che faccia solo un reindirizzamento???
si puņ reindirizzare o con un javascript o con un meta tag o con un header
oppure metti un link con su scritto entra nel sito che manda a quello nuovo, no? :wink:
-
anche prova a farlo girare e vedi :wink:
-
che fa? mi crasha il sistema :lol: