汗!自己有资料竟然没去细看~~ expires=date; Setting no expiration date on a cookie causes it to expire when the browser closes. If you set an expiration date in the future, the cookie is saved across browser sessions. If you set an expiration date in the past, the cookie is deleted. Use GMT format to specify the date. domain=domainname; Setting the domain of the cookie allows pages on a domain made up of more than one server to share cookie information. path=path; Setting a path for the cookie allows the current document to share cookie information with other pages within the same domain—that is, if the path is set to /thispathname, all pages in /thispathname and all pages in subfolders of /thispathname can access the same cookie information. secure; Setting a cookie as secure; means the stored cookie information can be accessed only from a secure environment.
expires=date;
Setting no expiration date on a cookie causes it to expire when the browser closes. If you set an expiration date in the future, the cookie is saved across browser sessions. If you set an expiration date in the past, the cookie is deleted. Use GMT format to specify the date. domain=domainname;
Setting the domain of the cookie allows pages on a domain made up of more than one server to share cookie information. path=path;
Setting a path for the cookie allows the current document to share cookie information with other pages within the same domain—that is, if the path is set to /thispathname, all pages in /thispathname and all pages in subfolders of /thispathname can access the same cookie information. secure;
Setting a cookie as secure; means the stored cookie information can be accessed only from a secure environment.
用分号加空格才能隔开
你的方法我试了,也不行,还是不能设置Cookie值。