点击下载链接 弹出页面实现代码
人气:0复制代码 代码如下:
<A
onclick=checkopen(this);
href="//www.qb5200.com"
target=_blank>打开下载页面1</A>
<script>
<!--
var original_url = ""
var adurl = new Array(9);
var isclick = false;
var adurl_i = 5;
adurl[0] = "//www.qb5200.com";
adurl[1] = "http://www.yuanma51.com/";
adurl[2] = "http://www.baidu.com/";
function selectFrom(iFirstValue,iLastValue){
var iChoces = Math.abs(iLastValue - iFirstValue) + 1;
return Math.floor(Math.random() * iChoces + iFirstValue);
}
adurl_i = selectFrom(0,2);
function checkopen(a){
if(adurl_i<9){
if(isclick==false){
original_url = a.href;
a.href = adurl[adurl_i];
isclick = true;
top.location.href = original_url;
}else{
a.href = original_url;
}
}
}
//-->
</script>
加载全部内容