注意大小写 window.navigator.cookieEnabled

解决方案 »

  1.   

    sure, i typed window.navigator.cookieEnabled, but, it still doesn't work well in some case. Did you guys get this problem before?
      

  2.   

    在IE6下是不一定的。IE6有Cookie的策略。
    在策略设置比较高(高到什么时我不清楚)
    就算cookieEnabled为true,
    但是就是不能往document.cookie下写cookie。
      

  3.   

    赞成 pi1ot(-=\Pilot/=-) 
    这是我以前写的用来检测的脚本:function CheckCookieEnable()
    {
    var checkName="CheckCookieEnableName";
    var value=Math.floor(Math.random()*1000000);
    var date=new Date();
    date.setFullYear(date.getFullYear()+1);
    document.cookie=checkName+"="+value+";path=/;expires="+date.toUTCString();
    if(GetCookie(checkName)==value)
    return true;
    return false;
    }