Created
June 20, 2016 14:44
-
-
Save jerrybendy/35a71c0623d893267d41b9e523041fa8 to your computer and use it in GitHub Desktop.
使用jQuery/JS操作浏览器Cookie https://icewing.cc/jquery-cookie.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 设置Cookie, 有效期2小时 | |
$.setCookie('test', 'This is value', 7200); | |
// 获取Cookie的值 | |
alert($.getCookie('test')); | |
// 删除刚刚设置的Cookie | |
$.removeCookie('test'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment