- $(document).ready(function() {
- var dt = new Date();
- dt.setSeconds(dt.getSeconds() + 60);
- document.cookie = "cookietest=1; expires=" + dt.toGMTString();
- var cookiesEnabled = document.cookie.indexOf("cookietest=") != -1;
- if(!cookiesEnabled){
- //cookies不能用……..
- }
- });
- //该片段来自于http://www.codesnippet.cn/detail/211220121129.html
来源: http://www.codesnippet.cn/detail/211220121129.html