set home page
Added to the favorites
All articles(网络文学目录)
All Pictures(图片目录)
All Softwares(软件目录)
如何让javascript,操作Cookie_php资料_编程技术
Writer:
delv
Article type:
Programming skills(编程技巧)
Time:
2013/12/29 4:44:48
Browse times:
457
Comment times:
0
如何让javascript,操作Cookie_php资料_编程技术
Head photo
Go homepage
Upload pictures
Write articles
如何让javascript 操作Cookie_php资料_编程技术-你的首页-uuhomepage.com
其实很简单
document.cookie
=
"
proZiLiao=1;
"
;
内容是以key=value的形式,用;分号分隔
读取的话
var
cks
=
document.cookie.split(
"
;
"
);
按照;分号分隔为数组
for
(i
=
0
;i
<
cks.length;i
++
)
{
var
val
=
cks[i].substring(
0
,cks[i].indexOf(
"
=
"
));
//
字符串方式截取=号两边的
if
(val.replace(
"
"
,
""
)
==
"
proZiLiao
"
)
{
alert(
"
this Cookie!
"
);
}
}
There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)
Comments can't is empty(评论不能为空)
Disclaimer
Privacy Policy
About us
Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.