The simplest static page refresh
123<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">4<title>new Page 5</title>5<meta name= "GENERATOR" content= "Microsoft FrontPage 3.0" >6<script language= "JavaScript" >7<!--8 varCaution =false9 functionSetcookie (name, value, expires, path, domain, secure) {Ten varCurcookie = name + "=" + Escape (value) + ((expires)? "; Expires= "+ expires.togmtstring ():" ") + (path)?; Path= "+ Path:" ") + (domain)?"; domain= "+ domain:" ") + (Secure)?"; Secure ":" ") One if(!caution | | (name + "=" + Escape (value)). Length <= 4000) ADocument.cookie =Curcookie - Else if(Confirm ("Cookie exceeds 4KB and would be cut!")) -Document.cookie =Curcookie the } - functionGetCookie (name) { - varprefix = name + "=" - varCookiestartindex =document.cookie.indexOf (prefix) + if(Cookiestartindex = =-1) - return NULL + varCookieendindex = Document.cookie.indexOf (";", Cookiestartindex +prefix.length) A if(Cookieendindex = =-1) atCookieendindex =Document.cookie.length - returnUnescape (document.cookie.substring (Cookiestartindex +Prefix.length, - cookieendindex)) - } - functionDeletecookie (name, path, domain) { - if(GetCookie (name)) { inDocument.cookie = name + "=" + (path)? "; Path= "+ Path:" ") + (domain)?"; domain= "+ domain:" ") +"; Expires=thu, 01-jan-70 00:00:01 GMT " - } to } + functionfixdate (date) { - varBase =NewDate (0) the varSkew =base.gettime () * if(Skew > 0) $Date.settime (Date.gettime ()-skew)Panax Notoginseng } - varnow =NewDate () the fixdate (now) +Now.settime (Now.gettime () + 730 * 24 * 60 * 60 * 1000) A varvisits = GetCookie ("Counter") the if(!visits) +Visits = 1 - Else $visits = parseint (visits) + 1 $Setcookie ("Counter", visits, now) -document.write ("<font size=6 color=red> welcome You, you are:" + visits + "Visitors to the site") - // - the</script> -Wuyi<body> the<p align= "right" > </p> -</body> Wu:
Simple JST statistics static website access times