<html>
<head>
<script type=
function getCookie(c_name) //獲得cookie
{
if (document
{
c_start=document
if (c_start!=
{
c_startc_start=c_start + c_name
c_end=document
if (c_end==
return unescape(document
}
}
return
}
function setCookie(c_name
{
var exdate=new Date()
exdate
document
((expiredays==null) ?
}
function checkCookie() //檢查cookie
{
username=getCookie(
if (username!=null && username!=
{alert(
else
{
username=prompt(
if (username!=null && username!=
{
setCookie(
}
}
}
</script>
</head>
<body onLoad=
</body>
</html>
返回目錄
編輯推薦
Java Web開發詳解
PHP Web開發學習實錄
ASP
[
From:http://tw.wingwit.com/Article/program/PHP/201311/21527.html