5秒之后转到梦之都首页:
<meta http-equiv="refresh" content="5; url="http://www.dreamdu.com/" /> url="http://www.dreamdu.com/"这里怎么写个变量,我想每次跳到不同的网页。
比如这次是梦之都首页www.dreamdu.com
下次是hao123.comm
...怎么在url传个参数
<meta http-equiv="refresh" content="5; url="http://www.dreamdu.com/" /> url="http://www.dreamdu.com/"这里怎么写个变量,我想每次跳到不同的网页。
比如这次是梦之都首页www.dreamdu.com
下次是hao123.comm
...怎么在url传个参数
[code=HTM]
window.onload=function(){
setTimeout(function(){
window.location='http://www.baidu.com'
},5000);
}
[/code]
window.onload=function(){
setTimeout(function(){
window.location=arr[parseInt(Math.random()*3)];
},5000);
} [/code]
随机跳转!如果要按顺序的,必须借用后台了,不然跳转到其他公用站点是无法保存上一次的值的!
var OjUrl=new Array();
OjUrl=['http://www.baidu.com/','http://www.hao123.com/','http://www.163.com/'];
var OUrl = Math.floor(Math.random()*OjUrl.length);
setTimeout(function(){ window.location=OjUrl[OUrl]},5000);
[/code]
[code=CS]如果想指定那个url,也可以从后台获取设置到js中[/code]