#1 到訪次數 - 蛙 (Administrator) 發表於 2-6-2012 09:12
<BR><BR><BR><BR><script type="text/javascript"><!--
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));}
function GetCookie (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 getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0)
break;}
return null;}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.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 DeleteCookie(name) {
var exp = new Date();
FixCookieDate (exp); // Correct for Mac bug
exp.setTime (exp.getTime() - 1); // This cookie is history
var cval = GetCookie (name);
if (cval != null)
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();}
var expdate = new Date();
var num_visits;
expdate.setTime(expdate.getTime() + (5*24*60*60*1000));
if (!(num_visits = GetCookie("num_visits"))
num_visits = 0;
num_visits++;
SetCookie("num_visits",num_visits,expdate);
document.write("你是第 "+num_visits+" 次到訪本站。"
// --></script>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<BR><BR><BR><BR>
<P><FONT color=blue><script type="text/javascript"><!--<BR>function getCookieVal(offset) {<BR>var endstr = document.cookie.indexOf (";", offset);<BR>if (endstr == -1)<BR>endstr = document.cookie.length;<BR>return unescape(document.cookie.substring(offset, endstr));}<BR>function GetCookie (name) {<BR>var arg = name + "=";<BR>var alen = arg.length;<BR>var clen = document.cookie.length;<BR>var i = 0;<BR>while (i < clen) {<BR>var j = i + alen;<BR>if (document.cookie.substring(i, j) == arg)<BR>return getCookieVal (j);<BR>i = document.cookie.indexOf(" ", i) + 1;<BR>if (i == 0)<BR>break;}<BR>return null;}<BR>function SetCookie (name, value) {<BR>var argv = SetCookie.arguments;<BR>var argc = SetCookie.arguments.length;<BR>var expires = (argc > 2) ? argv[2] : null;<BR>var path = (argc > 3) ? argv[3] : null;<BR>var domain = (argc > 4) ? argv[4] : null;<BR>var secure = (argc > 5) ? argv[5] : false;<BR>document.cookie = name + "=" + escape (value) +<BR>((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +<BR>((path == null) ? "" : ("; path=" + path)) +<BR>((domain == null) ? "" : ("; domain=" + domain)) +<BR>((secure == true) ? "; secure" : ""}<BR>function DeleteCookie(name) {<BR>var exp = new Date();<BR>FixCookieDate (exp); // Correct for Mac bug<BR>exp.setTime (exp.getTime() - 1); // This cookie is history<BR>var cval = GetCookie (name);<BR>if (cval != null)<BR>document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();}<BR>var expdate = new Date();<BR>var num_visits;<BR>expdate.setTime(expdate.getTime() + (5*24*60*60*1000));<BR>if (!(num_visits = GetCookie("num_visits"))<BR>num_visits = 0;<BR>num_visits++;<BR>SetCookie("num_visits",num_visits,expdate);<BR>document.write("你是第 "+num_visits+" 次到訪本站。");<BR>// --></script></FONT></P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff size=3>如不能顯示語法效果可貼去本站</FONT><A href="http://www.bunbun000.com/html/index.htm" target=_blank><FONT color=red size=3>語法測試板</FONT></A><FONT color=#0000ff size=3>試看</FONT></P>