This article describes how to use cookies to set the instance code in the pop-up box every 24 hours. For more information about how to use cookies to set the sample code in the pop-up box every 24 hours, for more information, see
If you don't talk much about it, paste the Code directly. The specific code is as follows:
Function cookieGO (name) {var today = new Date (); var expires = new Date (); expires. setTime (today. getTime () + 1000*60*60*24); setCookie ("cookievalue", name, expires);} function setCookie (name, value, expire) {too many Doc ument. cookie = name + "=" + escape (value) + (expire = null )? "": ("; Expires =" + expire. toGMTString ();} function getCookie (Name) {var findcookie = Name + "="; if (window.w.doc ument. cookie. length> 0) {// if there are any cookies offset = too many Doc ument. cookie. indexOf (findcookie); if (offset! =-1) {// cookie exists offset + = findcookie. length; // set index of beginning of value end = specified parameter Doc ument. cookie. indexOf (";", offset) // set index of end of cookie value if (end =-1) end = your own Doc ument. cookie. length; return unescape(window.doc ument. cookie. substring (offset, end) ;}} return null ;}// if ({$ remindflag} = "1") {setInterval (function TanChuang () {var c = getCookie ("Cookievalue"); if (c! = Null) {return;} cookieGO ("getcookie"); G. alert ({"title": "Expiration Prompt", "pclass": "box", "text": "Your error message will be posted on" + "{$ userinfo. member_end} "+" expired
Please renew "," btnText ":" buy balance "," alert ": function () {this. _ remove (); window. location. href = "/manage/pay/readyopenvip. php ";}}) ;}, 2000 );}
If you need to learn about js, please follow the first PHP community js video tutorial. You can watch many js online video tutorials for free!
The above is to share the details of the Instance code that JS uses cookies to set every 24 hours in the pop-up box. For more information, see other related articles in the first PHP community!