This Domain(Admin5.com) is for Sale:

初学Javascript之cookie篇(译)

时间:2007-10-22  来源:不详  作者:林子

var secure = (argc > 5) ? argv[5] : false;
document.cookie = name "=" escape (value)
((expires == null) ? "" : ("; expires=" expires.toGMTString()))
((path == null) ? "" : ("; path=" path))
((domain == null) ? "" : ("; domain=" domain))
((secure == true) ? "; secure" : "");
}
function setLastlastVisitCookie ()
{
var rightNow = new Date();
var expdate = new Date();
expdate.setTime (expdate.getTime() 1 * (24 * 60 * 60 * 1000)); // 1 day
SetCookie ("lastVisit", rightNow.getTime(), expdate, "/");
}
function ResetCookie()
{
SetCookie("lastVisit", 0, null, "/");
}
// -->
</script>
</body>
</html>
本文来自织梦

本文来自织梦

dedecms.com

看完这篇,您有何感觉呢?

文章评论

共有位Admini5网友发表了评论 查看完整内容

24小时热门信息