jquery-cookie:http://www.bootcdn.cn/jquery-cookie/
How to use:
1, introduce jQuery.Cookie.js plug-in.
<script src= "Jquery.cookie.js" type= "Text/javascript" ></script>
2, the specific properties and their invocation methods.
Reference Document: http://www.bootcdn.cn/jquery-cookie/readme/
//invocation of the cookie plugin method$.cookie ("User", "ZF", {expires:7,//expiry time 7 days //Path : "/",//set path, previous layer //Domain : "www.xxx.com",//Set domain name //secure:true,//default = False, security protocol HTTPS required }); //Alert ($.cookie ("user")); Read Cookies //alert ($.cookie ()); Read All Cookies$.cookie.raw =false;//turns off encoding/decoding, which defaults to false. That is, "Zhang Fei" will be converted into a long string of code to be stored in the cookie, but the call will still show "Zhang Fei"$.cookie ("name", "Zhang Fei")); //$.removecookie ("user"); Delete Cookies
jquery Cookie Plugin