Home > Web Front-end > JS Tutorial > body text

Pop-up advertising special effects code (one IP only pops up once)_advertising code

WBOY
Release: 2016-05-16 19:13:33
Original
1516 people have browsed it

<script> <BR>var cookieString = new String(document.cookie) <BR>var cookieHeader = 'happy_pop=' //更换happy_pop为任意名称 <BR>var beginPosition = cookieString.indexOf(cookieHeader) <BR>if (beginPosition <0){ <BR>window.open('2.html','','top=0,left=0,width=787,height=480,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes'); <BR>var Then = new Date()     <BR>Then.setTime(Then.getTime() + 60*1000 ) //同一ip设置过期时间,即多长间隔跳出一次 <BR>document.cookie = 'happy_pop=yes;expires='+ Then.toGMTString()  //更换happy_pop和第4行一样的名称 <BR>} <BR></script>
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template