var 注意= false
function setCookie(name, value, expires, path, domain, secure) {
var cur (過期) ? "; expires=" expires.toGMTString() : "")
((路徑) ? "; path=" 路徑: "
((安全) ? "; secure" : "")
if (!caution || (name "=" escape(value)).length else
if (confirm("Cookie 超過4KB,將受剪切!"))
🎜>function getCookie(name) {
var 前綴= name "="
var cookieStartIndex = document.cookie.indexOf(prefix)
if (cookieStartIndex == -1) var cookieEndIndex = document.cookie.indexOf(";" , cookieStartIndex prefix.length)
if (cookieEndIndex == -1)
cookie下(cookieStartIndex prefix.length, cookieEndIndex))
}
函數deleteCookie (姓名、路徑、領域) {
if (getCookie(姓名)) {
((路徑) ? "; path=" 路徑: "")
((網域) ? "; 網域名稱= " 網域: "")
}
}
function fixDate(date) {
var base = new Date(0)
var skew = base.getTime() date.setTime(date.getTime() -偏差)
}
var now = new Date()
fixDate(now)
now.setTime(now.getTime() 365 * 24 * 60 * 60 * 1000)
var 訪問次數= getCookie("counter")
if (!visits)
造訪次數= 1
else
)
document.write("您是造訪的第一個"訪問"位使用者! ")
// -->