JS Settings Cookie Validity Period Detection Cookie

Set the cookie function directly on the code:

 Function setCookie (Name, value, days) {// set cookie var d = new Date (); D.SetTime (D.getTime () + (DAYS * 24 * 60 * 60 * 1000)); var expires = "expires =" + DOCUMENT.COOKIE = Name + "=" + value + ";" + Expires;}   
Set cookie:

SetCookie (“key”, ‘Value ‘, 1);
Cookie detection:
   
Document.cookie.indexof “Key”)

Return value-1 indicates that there is no such cookie

as described above is a minimum of JS settings for you to introduce a cookie validity period detection cookie I hope to help everyone. If you have any questions, please leave a message, Xiaobian will reply to everyone in time. Thank you very much for your support of Tumi Cloud Website!
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment