喜欢一打开网站就知道今天网站的访问量的小朋友们请进
代码如下[code]<SCRIPT language=JavaScript>6sBeiy9jq#?j<!--
var caution = false
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "")
if (!caution || (name + "=" + escape(value)).length <= 4000)
document.cookie = curCookie#v0nKPS^
else
if (confirm("Cookie exceeds 4KB and will be cut!"))RP~J'B5n+{
document.cookie = curCookie
}
function getCookie(name) {
var prefix = name + "="#sSV m7Hi%D6a
var cookieStartIndex = document.cookie.indexOf(prefix)L w^)?i*o1k
if (cookieStartIndex == -1)
return null]SCli:i
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)Mad&o(Xe7^xY
if (cookieEndIndex == -1)K E`2n0L/E-y
cookieEndIndex = document.cookie.length
return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))~:cp?ta'u/b
}8w7M4v8qF d
function deleteCookie(name, path, domain) {
if (getCookie(name)) {
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +7]I j$`!RdVc&XK
"; expires=Thu, 01-Jan-70 00:00:01 GMT"
}
}
function fixDate(date) {/Qk)RE8fi
var base = new Date(0)0i,sP a0_C\Z%|*v
var skew = base.getTime()
if (skew > 0)E"S&Bs?Cj4x
date.setTime(date.getTime() - skew)
}
var now = new Date()
fixDate(now)
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000)
var visits = getCookie("counter")3g(X U BqUMZ/R\
if (!visits).^ J1if6|{'N$oI
visits = 1c-m|+q9v/} _E k
else
visits = parseInt(visits) + 1JGP1h\x9i
setCookie("counter", visits, now)Zj9I*@8aP
document.write("www.rvmtv.com欢迎光临本站,您是今天第" + visits + "访问者!")~K!\k|fy
// -->
</SCRIPT>[/code]
页:
[1]