1
How to detect that JavaScript and/or Cookies are disabled?检测如果Cookie在IE 11使用JS
jQuery detecting cookies enabled
我都尝试解决方案支持的,但仍IE返回真我,即使我设置残疾人饼干。
请帮忙。
How to detect that JavaScript and/or Cookies are disabled?检测如果Cookie在IE 11使用JS
jQuery detecting cookies enabled
我都尝试解决方案支持的,但仍IE返回真我,即使我设置残疾人饼干。
请帮忙。
我用这个:
function areCookiesEnabled() {
try {
document.cookie = 'cookietest=1';
var cookiesEnabled = document.cookie.indexOf('cookietest=') !== -1;
document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
return cookiesEnabled;
} catch (e) {
return false;
}
}
的可能的复制[?如何检测中的JavaScript和/或Cookie已停用(http://stackoverflow.com/questions/4603289/how-to-detect-that-javascript-and-or-cookies-are-disabled) – Pineda
我曾经有过类似的问题。发现如果我在本地打开文件,它不会在IE11中阻止Cookie。 – Tallerlei