- 積分
- 25
- 威望
- 25
- 金錢
- 25
- 最後登錄
- 2012-3-2
|
<script language="JavaScript">
function GookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function Gookie(name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return GookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function Sookie(name, value) {
var argv = Sookie.arguments;
var argc = Sookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires="
+ expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function Dookie(name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = Gookie (name);
document.cookie = name + "=" + cval + "; expires="
+ exp.toGMTString();
}
</script></font></td>
</tr>
<tr>
<td><font color="#0080c0" size="3"><script>
var expdate = new Date();
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
if(!(visits = Gookie("3wave"))) {visits = 1;
Sookie("3wave", visits, expdate, "/", null, false);
document.write("這是您第 " + visits + " 次光臨本站!");}
else{
visits++;
Sookie("3wave", visits, expdate, "/", null, false);
document.write("這是您第 " + visits + " 次光臨本站!");
}
</script> |
|