JavaScript打开页面后自动随机跳转页面代码
[08-08 00:41:30] 来源:http://www.xuehuiba.com Javascript教程 阅读:8642次
概要:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>www.joyrssmail.com</title><script language=javascript>function randompage(){var randomindex=Math.floor(Math.random()*3)+1;//如果你有四个页面就把3改成4,如果有5个,就把3改成5top.location.replace('index'+randomindex+'.htm');}randompage()</script></head><body ></body></html>
JavaScript打开页面后自动随机跳转页面代码,标签:javascript视频教程,javascript教程下载,http://www.xuehuiba.com
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>www.joyrssmail.com</title>
<script language=javascript>
function randompage(){
var randomindex=Math.floor(Math.random()*3)+1;//如果你有四个页面就把3改成4,如果有5个,就把3改成5
top.location.replace('index'+randomindex+'.htm');
}
randompage()
</script>
</head>
<body >
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>www.joyrssmail.com</title>
<script language=javascript>
function randompage(){
var randomindex=Math.floor(Math.random()*3)+1;//如果你有四个页面就把3改成4,如果有5个,就把3改成5
top.location.replace('index'+randomindex+'.htm');
}
randompage()
</script>
</head>
<body >
</body>
</html>
Tag:Javascript教程,javascript视频教程,javascript教程下载,电脑知识学习 - 网页制作 - Javascript教程
最新更新