Home > Web Front-end > JS Tutorial > Code for pop-up advertising special effects (one IP only pops up once)_javascript skills

Code for pop-up advertising special effects (one IP only pops up once)_javascript skills

WBOY
Release: 2016-05-16 19:11:01
Original
1232 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