Home  >  Article  >  Web Front-end  >  Click the download link to pop up the page implementation code_advertising code

Click the download link to pop up the page implementation code_advertising code

WBOY
WBOYOriginal
2016-05-16 18:45:181268browse
复制代码 代码如下:

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>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn