js| Collection
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 ":" ")
Document.cookie=curcookie;
}
function GetCookie (name) {
var prefix = name + "="
var cookiestartindex = document.cookie.indexOf (prefix)
if (Cookiestartindex = = 1)
return null
var cookieendindex = document.cookie.indexOf (";", Cookiestartindex + prefix.length)
if (Cookieendindex = = 1)
Cookieendindex = Document.cookie.length
Return unescape (document.cookie.substring (Cookiestartindex + prefix.length, Cookieendindex))
}
var now = new Date ()
Now.settime (Now.gettime () + 6*1000)
var jb51num=10;
var visits = GetCookie ("WWW_XRSS_CN")
if (!visits)
Visits = 1
Else
visits = parseint (visits) + 1
if (Visits>parseint (Jb51num)) {
Alert (' no content ');
location.href= ' http://www.xrss.cn ';
}
Setcookie ("Www_xrss_cn", visits, now)