cookie不跨域,这是IE的问题,跟程序没关系

解决方案 »

  1.   

    cookie不跨域,这是IE的问题,跟程序没关系!!!要是能轻松的象你那样说的那样,那就惨了
      

  2.   

    我也知道,cookie跨域,是不允许的,但是有的网站就做了,比如allyes,yahoo等,是不是用js,我没仔细研究,但是经过测试,确实可以写到本机上。想个办法,应该也可以做到。不知道,它们是怎么实现的。
      

  3.   

    Cookies与一个服务器的域名相关联
      /**
     * Sets a Cookie with the given name and value.
     *
     * name       Name of the cookie
     * value      Value of the cookie
     * [expires]  Expiration date of the cookie (default: end of current session)
     *            默认情况下cookie的生存期是当浏览器关闭时被清空
     * [path]     Path where the cookie is valid (default: path of calling document)
     * [domain]   Domain where the cookie is valid
     *              (default: domain of calling document)
     *            默认情况下被访问文档的domain
     * [secure]   Boolean value indicating if the cookie transmission requires a
     *              secure transmission
     */
    function setCookie(name, value, expires, path, domain, secure)
    {
        document.cookie= name + "=" + escape(value) +
            ((expires) ? "; expires=" + expires.toGMTString() : "") +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            ((secure) ? "; secure" : "");
    }
      

  4.   

    document.cookie可以用来写cookie,如楼上。