用 document.cookie获取的值 "asdf; yang=zhang@zhang=yang; login=; CNZZDATA30060591=cnzz_eid=74209175-1351044555-&ntime=1351127145&cnzz_a=6&retime=1351128059098&sin=<ime=1351128059098&rtime=1; sdmenu_my_menu=1000000000000000000000000000000; CNZZDATA30059169=cnzz_eid=83058028-1350979372-&ntime=1351231159&cnzz_a=3&retime=1351232077380&sin=<ime=1351232077380&rtime=2; CNZZDATA30049607=cnzz_eid=99745689-1350632931-&ntime=1351506112&cnzz_a=4&retime=1351506156046&sin=http%253A%252F%252Flocalhost%253A25543%252Fddt%252Findex.aspx<ime=1351506156046&rtime=5; CNZZDATA1284672=cnzz_eid=4407617-1350530632-&ntime=1351507594&cnzz_a=12&retime=1351507583680&sin=http%253A%252F%252Flocalhost%253A25543%252Fddt%252Findex.aspx<ime=1351507583680&rtime=5; [email protected]"
这里面为什么没有获取到Name为 userinfo 的cookie的值
这里面为什么没有获取到Name为 userinfo 的cookie的值
解决方案 »
- div+css+js 实现文章的分页功能?
- iframe中提交数据的问题
- js中用DOM模型,读取或修改多个class属性该怎么写啊??在线等---
- **如何刷新即将链接前往的页面,求解啊
- 在一个函数中把对象存入一个数组
- 这是设置字体大小的,但如何设置 color 和字体的样式如:bold , italics ?
- javascript 里检测只允许 text 文本框事后为数字,怎么写呢!!
- 关于文件选择框
- 当鼠标在一表格(table)上移动时,如何得知在哪一个单元格上(td)?(在线)
- Select有没有类似RemoveAll的方法,一次删除所有options?
- jquery 或js 正则问题
- radio单选按钮用图片替代在Chrome浏览器中不显示
//read cookie:
// Example:
// alert( readCookie("myCookie") );
readCookie : function(name)
{
var cookieValue = "";
var search = name + "=";
if(document.cookie.length > 0)
{
offset = document.cookie.indexOf(search);
if (offset != -1)
{
offset += search.length;
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
cookieValue = unescape(document.cookie.substring(offset, end))
}
}
return cookieValue;
} //write cookie:
// writeCookie("myCookie", "my name", 24);
// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.
// The hours parameter is optional; if hours is left out, the cookie value expires at the end of the visitor's browser session.
,writeCookie : function(name, value, hours)
{
var expire = "";
if(hours != null)
{
expire = new Date((new Date()).getTime() + hours * 3600000);
expire = "; expires=" + expire.toGMTString();
}
document.cookie = name + "=" + escape(value) + expire;
}
}