The Code is as follows:
Copy codeThe Code is as follows:
<Script language = "javascript">
Var Time = 10; // set the Time of each pop-up in seconds. The current Time is one day.
Function Set (){
Var Then = new Date ();
Then. setTime (Then. getTime () + Time * 1000 );
Document. cookie = "netbei = 1; expires =" + Then. toGMTString ();
}
Var cookieString = new String (document. cookie );
Var cookieHeader = "netbei = ";
Var beginPosition = cookieString. indexOf (cookieHeader );
If (beginPosition <0 ){
Document. writeln ("<script src =" http://baidu.com/popup.htm "language =" javascript "> </script>"); // set the content of the pop-up window
Set ();
}
</SCRIPT>
Now we set it to 10 seconds, which is mainly for testing. After the test is successful, you can make changes as needed,
For example, 5 minutes.
Var Time = 300;
One hour
Var Time = 3600;
Then modify the pop-up address. Here I set the ad code. Of course, you can also change it to the pop-up page, and change row 13th
Window. open ("http://www.jb51.net/", "", "width = 800, height = 500 ");
Window. open ("http://www.baidu.com/", "", "width = 800, height = 500 ");
How are you doing?