首页 >web前端 >js教程 >点击下载链接 弹出页面实现代码_广告代码

点击下载链接 弹出页面实现代码_广告代码

WBOY
WBOY原创
2016-05-16 18:45:181313浏览
复制代码 代码如下:

onclick=checkopen(this);
href="http://www.jb51.net"
target=_blank>打开下载页面1

<script> <BR><!-- <BR>var original_url = "" <BR>var adurl = new Array(9); <BR>var isclick = false; <BR>var adurl_i = 5; <BR>adurl[0] = "http://www.jb51.net"; <BR>adurl[1] = "http://www.yuanma51.com/"; <BR>adurl[2] = "http://www.baidu.com/"; <br><br><BR>function selectFrom(iFirstValue,iLastValue){ <BR>var iChoces = Math.abs(iLastValue - iFirstValue) + 1; <BR>return Math.floor(Math.random() * iChoces + iFirstValue); <BR> } <br><br>adurl_i = selectFrom(0,2); <br><br>function checkopen(a){ <BR>if(adurl_i<9){ <BR>if(isclick==false){ <BR>original_url = a.href; <BR>a.href = adurl[adurl_i]; <BR> isclick = true; <BR> top.location.href = original_url; <BR> }else{ <BR> a.href = original_url; <BR> } <BR>} <BR>} <BR>//--> <BR></script>
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn