<Script Language=
<!
document
//
</script>
<SCRIPT LANGUAGE=
<!
var caution = false
function setCookie(name
var curCookie = name +
((expires) ?
((path) ?
((domain) ?
((secure) ?
if (!caution || (name +
okie = curCookie
else
if (confirm(
okie = curCookie
}
function getCookie(name) {
var prefix = name +
var cookieStartIndex = okie
if (cookieStartIndex ==
return null
var cookieEndIndex = okie
if (cookieEndIndex ==
cookieEndIndex = okie
return unescape(okie
}
function deleteCookie(name
if (getCookie(name)) {
okie = name +
((path) ?
((domain) ?
}
}
function fixDate(date) {
var base = new Date(
var skew = base
if (skew >
date
}
var now = new Date()
fixDate(now)
now
var visits = getCookie(
if (!visits)
visits =
else
visits = parseInt(visits) +
setCookie(
document
//
</SCRIPT>
<Script Language=
document
</SCRIPT>
<script language=
<!
document
// end hiding
</script>
把以下代碼放在<head></head>之間
<script>
var name=prompt(
</script>
</font>
把以下代碼放在HTML文件中
<center>
<font color=green>
<script>document
</font>
其它要輸出信息
</font>
<HTML>
<HEAD>
<TITLE>Name
<SCRIPT LANGUAGE=
<!
var expDays =
var exp = new Date();
exp
function Who(info){
var VisitorName = GetCookie(
if (VisitorName == null) {
VisitorName = prompt(
SetCookie (
}
return VisitorName;
}
function When(info){
var rightNow = new Date()
var WWHTime =
WWHTime = GetCookie(
WWHTime = WWHTime *
var lastHereFormatting = new Date(WWHTime);
var intLastVisit = (lastHereFormatting
(lastHereFormatting
var lastHereInDateFormat =
var dayOfWeek = lastHereInDateFormat
var dateMonth = lastHereInDateFormat
var timeOfDay = lastHereInDateFormat
var year = lastHereInDateFormat
var WWHText = dayOfWeek +
SetCookie (
return WWHText
}
function Count(info){
var WWHCount = GetCookie(
if (WWHCount == null) {
WWHCount =
}
else{
WWHCount++;
}
SetCookie (
return WWHCount;
}
function set(){
VisitorName = prompt(
SetCookie (
SetCookie (
SetCookie (
}
function getCookieVal (offset) {
var endstr = okie
if (endstr ==
endstr = okie
return unescape(okie
}
function GetCookie (name) {
var arg = name +
var alen = arg
var clen = okie
var i =
while (i < clen) {
var j = i + alen;
if (okie
return getCookieVal (j);
i = okie
if (i ==
}
return null;
}
function SetCookie (name
var argv = SetCookie
var argc = SetCookie
var expires = (argc >
var path = (argc >
var domain = (argc >
var secure = (argc >
okie = name +
((expires == null) ?
((path == null) ?
((domain == null) ?
((secure == true) ?
}
function DeleteCookie (name) {
var exp = new Date();
exp
var cval = GetCookie (name);
okie = name +
}
// End
</SCRIPT>
</HEAD>
<BODY BGCOLOR=#ffffff vlink=#
<!
<CENTER>
<SCRIPT LANGUAGE=
if (Count()==
{
document
}
else
{
document
}
</SCRIPT>
</CENTER>
</BODY>
</HTML>
From:http://tw.wingwit.com/Article/program/Java/Javascript/201311/25300.html