Quantos segundos ele pulará automaticamente para outras páginas (script js)
Método 1:
Adicione JS entre <head> </ad Head>
A cópia do código é a seguinte:
<Script Language = "JavaScript">
var secs = 3; // Segundos de contagem regressiva
var url;
Carga de função (url) {
Url = url;
for (var i = secs; i> = 0; i--)
{
window.setTimeout ('DoupDate (' + i + ')', (secs-i) * 1000);
}
}
função doupdate (num)
{
document.getElementById ('SHOWDIV'). INNERHTML = 'Ele irá automaticamente para a página inicial após'+num+'' segundos ';
if (num == 0) {window.location = url;
}
</script>
Em seguida, adicione <corpo onload = "load ('index.asp')"> index.asp à página para a qual deseja pular.
Adicione <div id = "showdiv"> </div> entre <body> </body>
Método 2:
A cópia do código é a seguinte:
<p style = "text-indent: 2em; margin-top: 30px;">>
O sistema irá automaticamente para o novo URL em segundos após o <span id = "time"> 5 </span>. </p>
<script type = "text/javascript">
touturl ();
função deLeawurl () {
var atraso = document.getElementById ("time"). Innerhtml;
var t = setTimeout ("deounurl ()", 1000);
if (atraso> 0) {
atraso--;
Document.getElementById ("Time"). Innerhtml = atraso;
} outro {
ClearTimeout (t);
window.location.href = "//www.vevb.com";
}
}
</script>