語法展示:: http://home.graffiti.net/lgtf456ww/
請用IE6.0或更新版本觀看語法特效展示
將以下程式碼複製,貼在<body>及</body>標籤之間。
<center>
<script language="JavaScript1.2">
<!--
document.write("<font size=3 color=red>您的螢幕解析度是── "+screen.width+"X"+screen.height+"</font>");
-->
</script>
</center>
在 document.write("<font size=3 color=red>您的螢幕解析度是── "+screen.width+"X"+screen.height+"</font>"); 中修改要顯示的文字、大小與色彩
uuiop6623 發表在 痞客邦 留言(0) 人氣()
語法展示:: http://home.graffiti.net/hyjuioo98/
請用IE6.0或更新版本觀看語法特效展示
將以下程式碼複製,貼在<body>及</body>標籤之間。
<center>
<script language="JavaScript">
<!--
var c, cv=16;
if(cv!="Netscape")c=screen.colorDepth; else c=screen.pixelDepth;
var cs=c;
if(c==4)cs="4 位元 16 色";
if(c==8)cs="8 位元 256 色";
if(c==16)cs="16 位元高彩";
if(c>16)cs=cs+" 位元全彩";
if(c<cv);
document.write("<font size=3 color=red>您的螢幕色彩度是── "+cs+"</font>");
-->
</script>
</center>
在 document.write("<font size=3 color=red>您的螢幕色彩度是── "+cs+"</font>"); 中修改要顯示的文字、大小與色彩
uuiop6623 發表在 痞客邦 留言(0) 人氣()
語法展示:: http://home.graffiti.net/nhkkli22/
請用IE6.0或更新版本觀看語法特效展示
將以下程式碼複製,貼在<body>及</body>標籤之間。
<script language="JavaScript">
<!--
document.write("<center><font size=3 color=red>您的瀏覽器為 ── "+navigator.appName+"</font></center>");
-->
</script>
在 <font size=3 color=red> 中修改顯示文字的大小與色彩
uuiop6623 發表在 痞客邦 留言(0) 人氣()
語法展示:: http://home.graffiti.net/gfghgfhf/
請用IE6.0或更新版本觀看語法特效展示
將以下程式碼複製,貼在<head>及</head>標籤之間。
<script language="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 = (2 < argc) ? argv[2] : null;
var path = (3 < argc) ? argv[3] : null;
var domain = (4 < argc) ? argv[4] : null;
var secure = (5 < argc) ? 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 DisplayInfo()
{
var expdate = new Date();
var visit;
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
if(!(visit = GetCookie("visit")))
visit = 0;
visit++;
SetCookie("visit", visit, expdate, "/", null, false);
var message;
if(visit == 1)
message="注意看次數和訊息會變化ㄚ";
if(visit == 2)
message="要常來喔";
if(visit == 3)
message="哈哈..嘿嘿..";
if(visit == 4)
message="嗯......不知要說啥了......";
if(visit == 5)
message="國泰民安 世界和平";
if(visit >= 6)
message="記得將本站加入最愛喔 ^_^";
alert("\n"+"參觀本頁次數:第"
+" "+visit+""
+" 次"+"\n"+"\n"
+message);
}
-->
</script>
在 message="注意看次數和訊息會變化ㄚ"; 中修改要顯示的文字 |
自行增減訊息的數量,只要最後一條訊息改成>=就好(意思就是當次數>或=這一次時,一律使用此訊息) |
將以下程式碼複製,貼在插入<body >標籤裡面。
onload="DisplayInfo()"
uuiop6623 發表在 痞客邦 留言(0) 人氣()
語法展示:: http://home.graffiti.net/mmjkiop55t/
請用IE6.0或更新版本觀看語法特效展示
將以下程式碼複製,貼在<body>及</body>標籤之間。
<center>
<script language="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);
(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("<font size=5 color=blue>您是第 "+num_visits+" 次光臨本站</font>");
-->
</script>
</center>
在 document.write("<font size=3 color=red>您是第 "+num_visits+" 次光臨本站</font>"); 中修改要顯示的文字、大小與色彩
uuiop6623 發表在 痞客邦 留言(0) 人氣()