作者在 2007-02-02 21:42:00 发布以下内容
function Savecookie(cookieName, cookieValue)
{
//写入
cookies if(!cookieName) return;
var expires = new Date();
expires.setTime(expires.getTime() + 365 * 24 * 60 * 60 * 1000);
var cValue = cookieName + "=" + cookieValue + ";
expires=" + expires.toGMTString() + "; path=/; domain=.baidu.com";
document.cookie = cValue;
}
写入cookies的方法,参数:cookies的名称和cookies的值