网页随机跳转代码
zkx • 2021 年 05 月 31 日
Loading...
```shell
网页随机跳转var theAds = new Array(
"http://a",
"http://a",
"http://a",
"http://a",
"http://a"
);
shu = theAds.length ;
sx = parseInt(Math.random() * shu );
var tanurl = theAds[sx] ;
top.location.href = tanurl;
```
```shell
function dogo(){
var urls = new Array();
urls[0]="site1";
urls[1]="site2";
urls[2]="site3";
urls[3]="site4";
urls[4]="site5";
n = Math.floor(Math.random()* 5);
location.href= urls[n];
}
```
更多推荐
html自动随机跳转网址,网页随机跳转代码
发布评论