目前分類:網頁語法特效~日期時間 (50)

瀏覽方式: 標題列表 簡短摘要

語法展示::   http://home.graffiti.net/kklhttr5r/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<center>
現在時間:  
<IMG src="0.gif" name="hour1">
<IMG src="0.gif" name="hour2">時  
<IMG src="0.gif" name="minute1">
<IMG src="0.gif" name="minute2">分  
<IMG src="0.gif" name="second1">
<IMG src="0.gif" name="second2">秒  
</center>


將以下程式碼複製,貼在<head>及</head>標籤之間。

<script language="JavaScript">
<!--
numImg=new Array()
for(i=0;i<=9;i++){
 numImg[i]=new Image();
 numImg[i].src=i+".gif";
}
function Clock(){
 acDate=new Date();
 myHour=new String(acDate.getHours());
 if (eval(myHour)<10)myHour="0"+myHour;
 myMinute=new String(acDate.getMinutes());
 if (eval(myMinute)<10)myMinute="0"+myMinute;
 mySecond=new String(acDate.getSeconds());
 if (eval(mySecond)<10)mySecond="0"+mySecond;
 
 document.hour1.src=numImg[myHour.charAt(0)].src
 document.hour2.src=numImg[myHour.charAt(1)].src
 document.minute1.src=numImg[myMinute.charAt(0)].src
 document.minute2.src=numImg[myMinute.charAt(1)].src
 document.second1.src=numImg[mySecond.charAt(0)].src
 document.second2.src=numImg[mySecond.charAt(1)].src
 setTimeout("Clock()",1000);
}
-->
</script>


將以下程式碼複製,貼在插入<body >標籤裡面。

 onLoad="Clock()"


不要忘記付件也要一起帶回家喔~!!......     >>>>>>我是附件帶我回家<<<<<<<

下載後解壓縮,將圖檔置於網頁同一目錄下


uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/kujjyg222/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<script language="JavaScript">
<!--
document.write('<CENTER><IMG src="l_form.gif"><IMG src="am.gif" name="I1">');
document.write('<IMG src="8.gif" name="I2"><IMG src="8.gif" name="I3">');
document.write('<IMG src="point.gif"><IMG src="8.gif"name="I4"><IMG src="8.gif" name="I5">');
document.write('<IMG src="point.gif"><IMG src="8.gif" name="I6"><IMG src="8.gif" name="I7">');
document.write('<IMG src="r_form.gif"></CENTER>');
function TIME(){
t=new Date;
H="0"+t.getHours();
M="0"+t.getMinutes();
S="0"+t.getSeconds();
if(12<=H){
if(H==12){T="pm";}
else{H="0"+(H-12);T="pm";}}
else{
if(H==0){H=""+12;T="am";}
T="am";}
H=H.substring(H.length-2,H.length+1);
M=M.substring(M.length-2,M.length+1);
S=S.substring(S.length-2,S.length+1);
H10=H.charAt(0);H1=H.charAt(1);
M10=M.charAt(0);M1=M.charAt(1);
S10=S.charAt(0);S1=S.charAt(1);
setTimeout('TIME()',1000);
document.I1.src=T+".gif";
document.I2.src=H10+".gif";
document.I3.src=H1+".gif";
document.I4.src=M10+".gif";
document.I5.src=M1+".gif";
document.I6.src=S10+".gif";
document.I7.src=S1+".gif";
}
-->
</script>


將以下程式碼複製,貼在插入<body >標籤裡面。

 onLoad="setTimeout('TIME()',1000);"


不要忘記付件也要一起帶回家喔~!!......     >>>>>>我是附件帶我回家<<<<<<<

下載後解壓縮,將圖檔置於網頁同一目錄下

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/hygtdfds/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。


<center>
<script language="JavaScript">
<!--
document.write("<IMG SRC='a.gif'>");
document.write("<IMG SRC='0.gif' NAME='h10'>");
document.write("<IMG SRC='0.gif' NAME='h1'>");
document.write("<IMG SRC='c.gif'>");
document.write("<IMG SRC='0.gif' NAME='m10'>");
document.write("<IMG SRC='0.gif' NAME='m1'>");
document.write("<IMG SRC='c.gif'>");
document.write("<IMG SRC='0.gif' NAME='s10'>");
document.write("<IMG SRC='0.gif' NAME='s1'>");
document.write("<IMG SRC='b.gif'>");
image0 = new Image();image0.src = "0.gif";
image1 = new Image();image1.src = "1.gif";
image2 = new Image();image2.src = "2.gif";
image3 = new Image();image3.src = "3.gif";
image4 = new Image();image4.src = "4.gif";
image5 = new Image();image5.src = "5.gif";
image6 = new Image();image6.src = "6.gif";
image7 = new Image();image7.src = "7.gif";
image8 = new Image();image8.src = "8.gif";
image9 = new Image();image9.src = "9.gif";
 updateClockImage();
 function updateClockImage() {
     var time = new Date();
     document.images['s1'].src =
         eval("image" + (time.getSeconds() % 10) +".src");
     document.images['s10'].src =
         eval("image" + (Math.floor(time.getSeconds() / 10)) +".src");
     document.images['m1'].src =
         eval("image" + (time.getMinutes() % 10) +".src");
     document.images['m10'].src =
         eval("image" + (Math.floor(time.getMinutes() / 10)) +".src");
     document.images['h1'].src =
         eval("image" + (time.getHours() % 10) +".src");
     document.images['h10'].src =
         eval("image" + (Math.floor(time.getHours() / 10)) +".src");
     setTimeout("updateClockImage()",1000);
 }
-->
</script>
</center>


不要忘記把附件也帶走喔!!......         
>>>>>>>>>帶我回家<<<<<<<<<

附件解壓縮以後置於網頁同一目錄下

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/fvbhhhyu/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。


<script language="JavaScript">
<!--
dCol='#000000';
fCol='#000000';
sCol='#00FF00';
mCol='#0000FF';
hCol='#FF0000';
ClockWidth=35;
ClockHeight=35;
ClockFromMouseX=50;
ClockFromMouseY=100;
d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';
size=1;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.06;
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
if (ns){
for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
document.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
 var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
 F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
 F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
 }
for (i=0; i < H.length; i++){
 var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
 HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
 HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
 }
for (i=0; i < M.length; i++){
 var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
 ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
 ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
 }
for (i=0; i < S.length; i++){
 var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
 SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
 SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
 }
for (i=0; i < D.length; i++){
 var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
 DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
 DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
 }
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
}
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;
-->
</script>


dCol='#000000'; 中修改日期外圈的顏色
fCol='#000000'; 中修改數字內圈的顏色
sCol='#00FF00'; 中修改秒針的顏色
mCol='#0000FF'; 中修改分針的顏色
hCol='#FF0000'; 中修改時針的顏色
ClockWidth=35; 中修改時鐘的寬度
ClockHeight=35; 中修改時鐘的高度
ClockFromMouseX=50; 中修改與游標左右的距離
ClockFromMouseY=100; 中修改與游標上下的距離

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/kiorrfv/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<script language="JavaScript">
<!--
fcol='#8000FF';
sCol='#FF00FF';
mCol='#FF0000';
hCol='#0000FF';
ClockWidth=30;
ClockHeight=30;
ClockFromMouseX=40;
ClockFromMouseY=40;
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
msg='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';
size=1;
speed=0.5;
ns=(document.layers);
ie=(document.all);
msg=msg.split(' ');
n=msg.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fcol+">";
Split=360/n;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
y=new Array();
x=new Array();
Y=new Array();
X=new Array();
for (i=0; i < n; i++){
y[i]=0;
x[i]=0;
Y[i]=0;
X[i]=0;
}
if (ns){
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+msg[i]+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+msg[i]+'</font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++){
document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
}
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++){
document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
}
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++){
document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
}
document.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+ Math.PI*parseInt(time.getMinutes())/360;
if (ie){
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
 var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
 F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
 F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
 }
for (i=0; i < H.length; i++){
 var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
 HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
 HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
 }
for (i=0; i < M.length; i++){
 var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
 ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
 ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
 }
for (i=0; i < S.length; i++){
 var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
 SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
 SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
 }
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (var i=1; i < n; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;
-->
</script>


fcol='#8000FF'; 中修改數字的顏色
sCol='#FF00FF'; 中修改秒針的顏色
mCol='#FF0000'; 中修改分針的顏色
hCol='#0000FF'; 中修改時針的顏色
ClockWidth=30; 中修改時鐘的寬度
ClockHeight=30; 中修改時鐘的高度
ClockFromMouseX=40; 中修改與游標左右的距離
ClockFromMouseY=40; 中修改與游標上下的距離

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/kkmjiop3345gg/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<script language="JavaScript">
<!--
colors = new Array('#FF8000','#8000FF','#FF00FF');
sCol = '#000000';
mCol = '#0000FF';
hCol = '#FF0000';
H = '‧‧‧‧';
H = H.split('');
H = H.reverse();
M = '‧‧‧‧‧';
M = M.split('');
M = M.reverse();
S = '‧‧‧‧‧‧';
S = S.split('');
S = S.reverse();
dots = 12;
var Ypos = 0,Xpos = 0,Ybase = 0,Xbase = 0;
var ay = 0, ax = 0, Ay = 0, Ax = 0, by = 0, bx = 0, By = 0, Bx = 0, cy = 0, cx = 0, Cy = 0, Cx = 0, dy = 0, dx = 0, Dy = 0, Dx = 0;
count = 0;
count_a = 0;
move = 1;
ns = (document.layers)?1:0;
viz = (document.layers)?'hide':'hidden';
if (ns) {
for (i = 0; i < dots; i++)
document.write('<layer name=nface'+i+' top=0 left=0 bgcolor=#000000 clip="0,0,3,3"></layer>');
for (i = 0; i < S.length; i++)
document.write('<layer name=nx'+i+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+sCol+'><center>'+S[i]+'</center></font></layer>');
for (i = 0; i < M.length; i++)
document.write('<layer name=ny'+i+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+mCol+'><center>'+M[i]+'</center></font></layer>');
for (i = 0; i < H.length; i++)
document.write('<layer name=nz'+i+' top=0 left=0 width=36 height=36><font face=Verdana size=2 color='+hCol+'><center>'+H[i]+'</center></font></layer>');
}
else{
document.write('<div id="W" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < dots; i++) {
document.write('<div id="face" style="position:absolute;top:0px;left:0px;width:3px;height:3px;font-size:3px;background:#000000"></div>');
}
document.write('</div></div>');
document.write('<div id="X" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < S.length; i++) {
document.write('<div id="x" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:11px;color:'+sCol+';text-align:center;padding-top:10px">'+S[i]+'</div>');
}
document.write('</div></div>')
document.write('<div id="Y" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < M.length; i++) {
document.write('<div id="y" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:11px;color:'+mCol+';text-align:center;padding-top:10px">'+M[i]+'</div>');
}
document.write('</div></div>')
document.write('<div id="Z" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < H.length; i++) {
document.write('<div id="z" style="position:absolute;width:36px;height:36px;font-family:Verdana;font-size:11px;color:'+hCol+';text-align:center;padding-top:10px">'+H[i]+'</div>');
}
document.write('</div></div>');
}
if (ns) {
window.captureEvents(Event.MOUSEMOVE);
function nsMouse(evnt) {
Ypos = evnt.pageY + 100;
Xpos = evnt.pageX + 100;
}
window.onMouseMove = nsMouse;
}
else{
function ieMouse() {
Ypos = event.y + 100;
Xpos = event.x + 100;
}
document.onmousemove = ieMouse;
}
function clock() {
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs / 30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins / 30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr / 6 + Math.PI * parseInt(time.getMinutes()) / 360;
Ybase = 15;
Xbase = 15;
if (ns) {
document.layers["nx"+0].visibility = viz;
document.layers["ny"+0].visibility = viz;
document.layers["nz"+0].visibility = viz;
for (i = 0; i < S.length; i++) {
document.layers["nx"+i].top = ay - 12 + (i * Ybase) * Math.sin(sec);
document.layers["nx"+i].left = ax - 12 + (i * Xbase) * Math.cos(sec);
}
for (i = 0; i < M.length; i++) {
document.layers["ny"+i].top = by - 12 + (i * Ybase) * Math.sin(min);
document.layers["ny"+i].left = bx - 12 + (i * Xbase) * Math.cos(min);
}
for (i = 0; i < H.length; i++) {
document.layers["nz"+i].top = cy - 12 + (i * Ybase) * Math.sin(hrs);
document.layers["nz"+i].left = cx - 12 + (i * Xbase) * Math.cos(hrs);
}
for (i = 0; i < dots; ++i) {
document.layers["nface"+i].top = dy - 2 + (70 * Math.sin(-0.49+dots+i/1.9));
document.layers["nface"+i].left = dx + 4 + (70 * Math.cos(-0.49+dots+i/1.9));
}
}
else {
var scrll = document.body.scrollTop;
W.style.pixelTop = scrll;
X.style.pixelTop = scrll;
Y.style.pixelTop = scrll;
Z.style.pixelTop = scrll;
x[0].style.visibility=viz;
y[0].style.visibility = viz;
z[0].style.visibility = viz;
for (i = 0; i < S.length; i++) {
x[i].style.pixelTop = ay - 12 + (i * Ybase) * Math.sin(sec);
x[i].style.pixelLeft = ax - 12 + (i * Xbase) * Math.cos(sec);
}
for (i = 0; i < M.length; i++) {
y[i].style.pixelTop = by - 12 + (i * Ybase) * Math.sin(min);
y[i].style.pixelLeft = bx - 12 + (i * Xbase) * Math.cos(min);
}
for (i = 0; i < H.length; i++) {
z[i].style.pixelTop = cy - 12 + (i * Ybase) * Math.sin(hrs);
z[i].style.pixelLeft = cx - 12 + (i * Xbase) * Math.cos(hrs);
}
for (i = 0; i < dots; ++i) {
face[i].style.pixelTop = dy + 6 + (70 * Math.sin(-0.49 + dots + i / 1.9));
face[i].style.pixelLeft = dx + 4 + (70 * Math.cos(-0.49 + dots + i / 1.9));
}
}
}
function MouseFollow() {
ay = Math.round(Ay += ((Ypos) - Ay) * 4 / 15);
ax = Math.round(Ax += ((Xpos) - Ax) * 4 / 15);
by = Math.round(By += (ay - By) * 4 / 15);
bx = Math.round(Bx += (ax - Bx) * 4 / 15);
cy = Math.round(Cy += (by - Cy) * 4 / 15);
cx = Math.round(Cx += (bx - Cx) * 4 / 15);
dy = Math.round(Dy += (cy - Dy) * 4 / 15);
dx = Math.round(Dx += (cx - Dx) * 4 / 15);
clock();
setTimeout('MouseFollow()',10);
}
function colorstep() {
count +=move;
if (count >= dots) {count=0;count_a += move}
if (count_a == colors.length) count_a = 0;
if (ns) document.layers["nface"+count].bgColor = colors[count_a];
else face[count].style.background = colors[count_a];
setTimeout('colorstep()',100)
}
function StartAll() {
MouseFollow();
colorstep();
}
if (document.layers || document.all) window.onload = StartAll;
-->
</script>


colors = new Array('#FF8000','#8000FF','#FF00FF'); 中修改面板變化顏色
sCol = '#000000'; 中修改秒針顏色
mCol = '#0000FF'; 中修改分針顏色
hCol = '#FF0000'; 中修改時針顏色

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/gfrtyyuj/


請用IE6.0或更新版本觀看語法特效展示




將以下程式碼複製,貼在<head>及</head>標籤之間。

<script language="JavaScript">
<!--
fCol = '0000FF';
sCol = '000000';
mCol = 'FF00FF';
hCol = 'FF0000';
H = '....';
H = H.split('');
M = '.....';
M = M.split('');
S = '......';
S = S.split('');
Ypos = 0;
Xpos = 0;
Ybase = 8;
Xbase = 8;
dots = 12;
ns = (document.layers)?1:0;
if (ns) {
dgts = '1 2 3 4 5 6 7 8 9 10 11 12';
dgts = dgts.split(' ');
for (i = 0; i < dots; i++) {
document.write('<layer name=nsDigits'+i+' top=0 left=0 height=30 width=30><center><font face=Arial,Verdana size=1 color='+fCol+'>'+dgts[i]+'</font></center></layer>');
}
for (i = 0; i < M.length; i++) {
document.write('<layer name=ny'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
}
for (i = 0; i < H.length; i++) {
document.write('<layer name=nz'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
}
for (i = 0; i < S.length; i++) {
document.write('<layer name=nx'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
   }
}
else {
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 1; i < dots+1; i++) {
document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial,Verdana;font-size:10px;color:'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < M.length; i++) {
document.write('<div id=y style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
}
document.write('</div></div>')
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < H.length; i++) {
document.write('<div id=z style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < S.length; i++) {
document.write('<div id=x style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
}
document.write('</div></div>')
}
function clock() {
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;
if (ns) {
Ypos = window.pageYOffset+window.innerHeight-60;
Xpos = window.pageXOffset+window.innerWidth-80;
}
else {
Ypos = document.body.scrollTop + window.document.body.clientHeight - 60;
Xpos = document.body.scrollLeft + window.document.body.clientWidth - 60;
}
if (ns) {
for (i = 0; i < dots; ++i){
document.layers["nsDigits"+i].top = Ypos - 5 + 40 * Math.sin(-0.49+dots+i/1.9);
document.layers["nsDigits"+i].left = Xpos - 15 + 40 * Math.cos(-0.49+dots+i/1.9);
}
for (i = 0; i < S.length; i++){
document.layers["nx"+i].top = Ypos + i * Ybase * Math.sin(sec);
document.layers["nx"+i].left = Xpos + i * Xbase * Math.cos(sec);
}
for (i = 0; i < M.length; i++){
document.layers["ny"+i].top = Ypos + i * Ybase * Math.sin(min);
document.layers["ny"+i].left = Xpos + i * Xbase * Math.cos(min);
}
for (i = 0; i < H.length; i++){
document.layers["nz"+i].top = Ypos + i * Ybase * Math.sin(hrs);
document.layers["nz"+i].left = Xpos + i * Xbase * Math.cos(hrs);
   }
}
else{
for (i=0; i < dots; ++i){
ieDigits[i].style.pixelTop = Ypos - 15 + 40 * Math.sin(-0.49+dots+i/1.9);
ieDigits[i].style.pixelLeft = Xpos - 14 + 40 * Math.cos(-0.49+dots+i/1.9);
}
for (i=0; i < S.length; i++){
x[i].style.pixelTop = Ypos + i * Ybase * Math.sin(sec);
x[i].style.pixelLeft = Xpos + i * Xbase * Math.cos(sec);
}
for (i=0; i < M.length; i++){
y[i].style.pixelTop = Ypos + i * Ybase * Math.sin(min);
y[i].style.pixelLeft = Xpos + i * Xbase * Math.cos(min);
}
for (i=0; i < H.length; i++){
z[i].style.pixelTop = Ypos + i * Ybase*Math.sin(hrs);
z[i].style.pixelLeft = Xpos + i * Xbase*Math.cos(hrs);
   }
}
setTimeout('clock()', 50);
}
if (document.layers || document.all) window.onload = clock;
-->
</script>


fCol = '0000FF'; 中修改數字的顏色
sCol = '000000'; 中修改秒針的顏色
mCol = 'FF00FF'; 中修改分針的顏色
hCol = 'FF0000'; 中修改時針的顏色

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/likuuuy688/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<script language="JavaScript">
<!--
var TimerOrClock = "clock";
var layerH = 55;
var layerW = 90;
var location = "top_right";
var bgcolor = "#00FF00";
var text = "#FF0000";
var font_size = 2;
var font_face = "#FF00FF";
var message = "現在時間為:<br>";
var layer;
var IE = document.all;
var updateWatch;
var start = 0;
function writeTime(time)
{
    var color, size, face, out;
 color = (text)? text : "black";
 size = (font_size)? font_size : 2;
 face = (font_face)? font_face : "Arial";
 out = "<font face = \"" + face + "\" size = " + size + " color = \"" + color + "\">";
 out += (message)? message : "";
 if(!IE)
      out += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + time + "</font>";
 else
      out +=  time + "</font>";
 if(IE)
   layer.innerHTML = "<table width=\"100%\" height=\"100%\"><tr><td valign=\"middle\" align=\"center\">" + out + "</td></tr></table>";
    else
    {  
   layer.document.open();
   layer.document.write("<br> &nbsp;" + "<b>" + out + "</b>");
   layer.document.close();
 }
}
function clock()
{
  var hh, mm, ss;
  var time, d, ampm = "am";
  d = new Date();
  hh = d.getHours();
  mm = d.getMinutes();
  ss = d.getSeconds();
  if(hh > 12)
  {
     hh -= 12;
  ampm = "pm";
  } 
  hh = (hh < 10)? "0" + hh : hh;
  mm = (mm < 10)? "0" + mm : mm;
  ss = (ss < 10)? "0" + ss : ss;
  time = hh + ":" + mm + ":" + ss + "  " + ampm;
  writeTime(time);
}
function timer()
{
   var hh, mm, ss;
   var time;
   hh = parseInt("0" + (start / 3600), 10);
   mm = parseInt("0" + ((start - (hh * 3600)) / 60), 10);
   ss = start - (hh * 3600) - (mm * 60);
   if(start < 60)
     time = ss + " seconds ";
   else if(start < 3600 && start > 60)
     time = mm + " minutes " + ss + " seconds ";
   else
   {
     time = (hh == 1)? hh + " hour " : hh + " hours ";
  time += (mm == 1)? mm + " minute " : mm + " minutes "; 
   }
   writeTime(time);
   start++;
}
function scroller()
{
  var docH, docW, scrollT, scrollL;
  if(IE)
  {
    layer =  document.all.pane;
 if(layerH)
 {
   layer.height = layerH;
      layer.style.height = layerH;
 } 
 else 
   layerH = layer.height;

 if(layerW)
 {
   layer.width = layerW;
   layer.style.width = layerW;
 }
 else 
   layerW = layer.width;
 
 if(bgcolor)
   layer.style.background = bgcolor;
 docH = document.body.clientHeight;
 docW = document.body.clientWidth;
 scrollT = document.body.scrollTop;
 scrollL = document.body.scrollLeft;
    switch(location) 
 {
    case "top_left":  layer.style.posTop =  scrollT;
                         layer.style.posLeft = scrollL;
       break;
    case "top_right":    layer.style.posTop =  scrollT;
                         layer.style.posLeft = scrollL + (docW - layerW);
                            break;
       case "bottom_left":  layer.style.posTop =  scrollT + (docH - layerH);
                         layer.style.posLeft = scrollL;
                            break;
       case "bottom_right": layer.style.posTop =  scrollT + (docH - layerH);
                         layer.style.posLeft = scrollL + (docW - layerW);
                            break;
    default:             layer.style.posTop =  scrollT;
                         layer.style.posLeft = scrollL;
 }
    layer.style.visibility = "visible"; 
  }
  else
  {
    layer = document.layers.pane;
    if(!layerH)
   layerH = 200;
 if(!layerW)
   layerW = 100;
 layer.resizeTo(layerW,layerH);
    if(bgcolor && bgcolor != "transparent")
   layer.bgColor = bgcolor; 
 docH = window.innerHeight;
 docW = window.innerWidth;
 scrollT = window.pageYOffset;
 scrollL = window.pageXOffset;
 switch(location.toLowerCase()) 
 {
    case "top_left":  layer.moveTo(scrollL,scrollT);
       break;
    case "top_right":    layer.moveTo(scrollL + (docW - layerW) - 15, scrollT);
                         break;
       case "bottom_left":  layer.moveTo(scrollL, scrollT + (docH - layerH) - 15);
                            break;
       case "bottom_right": layer.moveTo(scrollL + (docW - layerW) - 15,scrollT + (docH - layerH) - 15);
                         break;
    default:             layer.moveTo(scrollL,scrollT);
 }
    layer.visibility = "show";
  } 
}
-->
</script>
<span id="pane"><layer name="pane" width=&{layerW}; height=&{layerH};></layer></span>
<script language="JavaScript">
<!--
setInterval("scroller();",100); 
if(TimerOrClock.toLowerCase() == "clock")
  setInterval("clock();",1000);
else
  setInterval("timer();",1000);
-->
</script>


var layerH = 55; 中修改時間的高度
var layerW = 90; 中修改時間的寬度
var location = "top_right"; 中修改時間的位置
top_left為左上,top_right為右上,bottom_left為左下,
bottom_right為右下
var bgcolor = "#00FF00"; 中修改底色的顏色
var text = "#FF0000"; 中修改文字的顏色
var font_size = 2; 中修改文字的大小




將以下程式碼複製,貼在<head>及</head>標籤之間。

<style type="text/css">
<!--
#pane {position: absolute; visibility: hidden;}
-->
</style>

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/asedccvb/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<script language = "JavaScript">
<!--
var bc_flg = true;
var bc_mode_flg = true;
var bc_mode = 0;
function b_clock() {
var msg, hour, min, sec, year, month, day;
var date = new Date();
year = date.getYear();
month = date.getMonth() + 1;
day = date.getDate();
var browser = navigator.appName;
if (browser.indexOf("Netscape") == -1) {
year += 1900;
year += "";
}
else {
if (year < 2000) {
year += 1900;
}
year = year.toString(10);
}
year = year.substring(2, year.length);
hour = date.getHours();
if (( min = date.getMinutes() ) < 10) {
min = "0" + min;
}
if (( sec = date.getSeconds() ) < 10) {
sec  = "0" + sec;
}
if (bc_mode == 0) {
msg = hour + " 時 " + min + " 分 " + sec + " 秒 ";
}
else if (bc_mode == 1) {
if ((hour - 12) < 0) {
msg = hour + " : " + min + " : " + sec + " AM ";
}
else {
msg = (hour-12) + " : " + min + " : " + sec + " PM ";
}
}
else if (bc_mode == 2) {
msg = year + " 年 " + month + " 月 " + day + " 日 ";
}
else {
msg = "mode error!";
}
bc_mode_flg = true;
if (bc_flg) {
document.write('<FORM NAME=b_clock_form><INPUT TYPE=button NAME=time VALUE=" " onClick="b_clock_mode()"></FORM>');
bc_flg = false;
}
document.b_clock_form.time.value = msg;
setTimeout("b_clock()", 200);
}
function b_clock_mode() {
if (bc_mode_flg) {
if (bc_mode < 2) {
bc_mode++
}
else {
bc_mode = 0;
}
bc_mode_flg = false;
}
else {
return;
}
}
-->
</script>
<center>
<script language = "JavaScript">
<!--
b_clock();
-->
</script>
</center>

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/srfhy34200kl/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<script language="JavaScript">
<!--
function goback(){
alert("掰掰!");
history.go(-1);
}
function getname(str) {
        alert("哈囉!");

}
function gettheDate() {
stopclock();
Todays = new Date();
TheDate = "" + (Todays.getMonth()+ 1) +" / "+ Todays.getDate() + " / " +
Todays.getYear()
document.clock.face.value = TheDate;
}
function showit () {
        var now = new Date();
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds();
          stopclock();
          TotalTime = (minutes > GetTotal)? (minutes-GetTotal):TotalTime;
        document.clock.face.value = TotalTime + " in minutes ";
}
var timerID = null;
var TotalTime = 0;
var GetTotal = 0;
var timerRunning = false;
function stopclock (){
        if(timerRunning)
                clearTimeout(timerID);
        timerRunning = false;
}
function startclock () {
        var now = new Date();
        stopclock();
          GetTotal=now.getMinutes();
        gettheDate()
        showtime();
}
function showtime () {
        var now = new Date();
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds()
        var timeValue = "" + ((hours >12) ? hours -12 :hours)
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue += ((seconds < 10) ? ":0" : ":") + seconds
        timeValue += (hours >= 12) ? " P.M." : " A.M."
        document.clock.face.value = timeValue;
        timerID = setTimeout("showtime()",1000);
        timerRunning = true;
}
function showtimer () {
        var now = new Date();
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds()
        var timeValue = "" + ((hours >12) ? hours -12 :hours)
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue += ((seconds < 10) ? ":0" : ":") + seconds
        timeValue += (hours >= 12) ? " P.M." : " A.M."
          document.clock.Tspent.value = timeValue;
        timerID = setTimeout("showtime()",1000);
        timerRunning = true;
}
-->
</script>
<center>
<form name="clock" onSubmit="0">
<input type="text" name="face" size="12" value="StartTimer()">
<input type="button" value="日期" onClick="gettheDate()">
<input type="button" value="時間" onClick="showtime()">
</form>
</center>

alert("掰掰!"); 中修改離開時的告別語
alert("哈囉!"); 中修改進入時的歡迎語


將以下程式碼複製,貼在插入<body >標籤裡面。

 onLoad="getname();startclock()" onunload="goback()"

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/likoopr/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<head>及</head>標籤之間。

<script language="JavaScript">
<!--
function showMilitaryTime() {
if (document.form.showMilitary[0].checked) {
return true;
}
return false;
}
function showTheHours(theHour) {
if (showMilitaryTime() || (theHour > 0 && theHour < 13)) {
return (theHour);
}
if (theHour == 0) {
return (12);
}
return (theHour-12);
}
function showZeroFilled(inValue) {
if (inValue > 9) {
return "" + inValue;
}
return "0" + inValue;
}
function showAmPm() {
if (showMilitaryTime()) {
return ("");
}
if (now.getHours() < 12) {
return (" AM");
}
return (" PM");
}
function showTheTime() {
now = new Date
document.form.showTime.value = showTheHours(now.getHours()) + ":" + showZeroFilled(now.getMinutes()) + ":" + showZeroFilled(now.getSeconds()) + showAmPm()
setTimeout("showTheTime()",1000)
}
-->
</script>


將以下程式碼複製,貼在插入<body >標籤裡面。

 onLoad="showTheTime()"


將以下程式碼複製,貼在<body>及</body>標籤之間。

<center>
<form name=form>
<input type=text name=showTime size=10><p>
<input type=radio name=showMilitary checked>24小時制<br>
<input type=radio name=showMilitary>12小時制<br>
</form>
</center>

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/xdswjyht/


請用IE6.0或更新版本觀看語法特效展示


將以下程式碼複製,貼在<head>及</head>標籤之間。

<script language="JavaScript1.2">
<!--
timeID = null;
timeRunning = false;
var current = "";
function stop(){
if(timeRunning){
clearTimeout(timeID);
timeRunning = false;
}
}
function time(){
tick = new Date();
hours = tick.getHours();
minutes = tick.getMinutes();
seconds = tick.getSeconds();
current = "" + ((hours >12) ? hours -12 :hours);
current += ((minutes < 10) ? ":0" : ":") + minutes;
current += ((seconds < 10) ? ":0" : ":") + seconds;
current += (hours >= 12) ? " P.M." : " A.M.";
timeID = setTimeout("time()",1000);
timeRunning = true;
Dclock = current;
}
function runClock(){
stop();
time();
}
function showClock(){
timeIs="現在時間:" + Dclock
alert(timeIs);
}
function LoadFunctions(){
runClock(); timerONE=window.setTimeout;
}
-->
</script>


將以下程式碼複製,貼在插入<body >標籤裡面。

 onLoad="LoadFunctions()"


將以下程式碼複製,貼在<body>及</body>標籤之間。

<center>
<A href="JavaScript:showClock()">想知道現在時間?按我看時間喔 ^_^</A>
</center>

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/ooopyhgg567gg/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<center>
<script language="JavaScript">
<!--
document.write("<span id='clock'></span>");
var now,hours,minutes,seconds,timeValue;
function showtime(){
now = new Date();
hours = now.getHours();
minutes = now.getMinutes();
seconds = now.getSeconds();
timeValue = (hours >= 12) ? "下午 " : "上午 ";
timeValue += ((hours > 12) ? hours - 12 : hours) + " 點";
timeValue += ((minutes < 10) ? " 0" : " ") + minutes + " 分";
timeValue += ((seconds < 10) ? " 0" : " ") + seconds + " 秒";
clock.innerHTML = timeValue;
setTimeout("showtime()",100);
}
showtime();
-->
</script>
</center>

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/mjkiuyy/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<head>及</head>標籤之間。

<script language="JavaScript">
<!--
var timerID = null
var timerRunning = false
function stopclock(){
// cannot directly test timerID on DEC OSF/1 in beta 4.
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
function startclock(){
// Make sure the clock is stopped
stopclock()
showtime()
}
function showtime(){
var now = new Date()
var hours = now.getHours()
var minutes = now.getMinutes()
var seconds = now.getSeconds()
var timeValue = "" + ((hours > 12) ? hours - 12 : hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
document.clock.face.value = timeValue
timerID = setTimeout("showtime()",1000)
timerRunning = true
}
-->
</script>


將以下程式碼複製,貼在插入<body >標籤裡面。

 onLoad="startclock()"


將以下程式碼複製,貼在<body>及</body>標籤之間。

<center>
<form name="clock" onSubmit="0">
<input type="text" name="face" size="12" value>
</form>
</center>


<input type="text" name="face" size="12" value> 中修改顯示列的長度

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::   http://home.graffiti.net/gjfgyjgfdjh/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<center>
<script language="JavaScript">
<!--
          today=new Date();
          var hours = today.getHours();
     {if((hours>0)&&(hours<12))
                  document.write("<IMG SRC="+"1.gif"+"><br>")
          else
                   {if((hours>11)&&(hours<18))
                   document.write("<IMG SRC="+"2.gif"+"><br>")
          else
                   {if((hours>17)&&(hours<24))
                   document.write("<IMG SRC="+"3.gif"+"><br>")
                   }
                   }
     }
-->
</script>
</center>


要記得把附件也一起帶走喔
......>>>>>>帶我走吧<<<<<<<<

下載附件後解壓縮,把圖檔置於網頁同一目錄下

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/sswsdef/


請用IE6.0或更新版本觀看語法特效展示

此特效會在1月1日、12月25日以及每逢星期日彈出訊息
其餘日期沒有反應
如果急著馬上檢視其效果
就請你調整電腦的日期吧 ^_^




將以下程式碼複製,貼在<body>及</body>標籤之間。



<script language="JavaScript">
<!--
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i] }
var d=new initArray("星期日", "星期一","星期二", "星期三","星期四", "星期五", "星期六");
month=today.getMonth()+1;
date=today.getDate();
day=d[today.getDay()+1];
if (day =="星期日"){
alert("今天是星期日,\n有沒有出去玩ㄚ?");
}
if (month==12 && date==25){
alert("今日是一個重要的日子\n因為...今天是\n聖誕節!");
}
if (month==1 && date==1){
alert("新年快樂!");
}
-->
</script>


if (day =="星期日") 中修改星期幾出現訊息
if (month==12 && date==25) 中修改出現訊息的日期,month為月份date是日期
alert("今天是星期日,\n有沒有出去玩ㄚ?"); 中修改訊息的內容;可加入\n斷行

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/lkujioo456vv/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。


<center>
<script language="JavaScript">
<!--
today=new Date();
var m=today.getMonth();
y=new Array(12);
y[0]=" 一月喔~";
y[1]=" 二月喔~";
y[2]=" 三月喔~";
y[3]=" 四月喔~";
y[4]=" 五月喔~";
y[5]=" 六月喔~";
y[6]=" 七月喔~";
y[7]=" 八月喔~";
y[8]=" 九月喔~";
y[9]=" 十月喔~";
y[10]=" 十一月喔~";
y[11]=" 十二月喔~";
document.write('本月是 '+(m+1)+' 月──'+y[m]);
-->
</script>
</center>


自行修改每月的問候語

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/kliuuu888r/


請用IE6.0或更新版本觀看語法特效展示

本效果會依時間變換問候語
(以一星期7天為一個週期)

將以下程式碼複製,貼在<body>及</body>標籤之間。

<script language="JavaScript">
<!--
document.write("<center><font size=3>")
now = new Date()
if (now.getDay() == 0)
document.write("今天是星期日")
if (now.getDay() == 1)
document.write("今天是星期一")
if (now.getDay() == 2)
document.write("今天是星期二")
if (now.getDay() == 3)
document.write("今天是星期三")
if (now.getDay() == 4)
document.write("今天是星期四")
if (now.getDay() == 5)
document.write("今天是星期五")
if (now.getDay() == 6)
document.write("今天是星期六")
document.write("</center></font>")
-->
</script>


<font size=3> 中修改文字的大小
自行修改每日的問候語

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/nhydghdrge/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<script language="JavaScript">
<!--
document.write("<center><table bgcolor=FF0000>"+"<font size=2 color=1F1F1F><br>")
var now=new Date()
var hr
hr=now.getHours()
if (hr==0)
{document.write("現在是晚上12點多")}
if (hr==1)
{document.write("現在是凌晨1點多")}
if (hr==2)
{document.write("現在是凌晨2點多")}
if (hr==3)
{document.write("現在是凌晨3點多")}
if (hr==4)
{document.write("現在是凌晨4點多")}
if (hr==5)
{document.write("現在是清晨5點多")}
if (hr==6)
{document.write("現在是清晨6點多")}
if (hr==7)
{document.write("現在是早上7點多")}
if (hr==8)
{document.write("現在是早上8點多")}
if (hr==9)
{document.write("現在是早上9點多")}
if (hr==10)
{document.write("現在是上午10點多")}
if (hr==11)
{document.write("現在是上午11點多")}
if (hr==12)
{document.write("現在是中午12點多")}
if (hr==13)
{document.write("現在是下午1點多")}
if (hr==14)
{document.write("現在是下午2點多")}
if (hr==15)
{document.write("現在是下午3點多")}
if (hr==16)
{document.write("現在是下午4點多")}
if (hr==17)
{document.write("現在是傍晚5點多")}
if (hr==18)
{document.write("現在是傍晚6點多")}
if (hr==19)
{document.write("現在是晚上7點多")}
if (hr==20)
{document.write("現在是晚上8點多")}
if (hr==21)
{document.write("現在是晚上9點多")}
if (hr==22)
{document.write("現在是晚上10點多")}
if (hr==23)
{document.write("現在是晚上11點多")}
document.write("</font></font></table></center>")
-->
</script>


<table bgcolor=FF0000> 中修改底線的色彩
<font size=2 color=1F1F1F> 中修改文字的大小及色彩
修改每個時段的問候語

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

語法展示::  http://home.graffiti.net/mmjkio6722/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。


<center>
<script language="JavaScript">
<!--
document.write("本頁最後更新日期:"+document.lastModified+"<p>")
-->
</script>
</center>


document.write("本頁最後更新日期:"+document.lastModified+"<p>") 中的中文字修改成想要顯示的文字

uuiop6623 發表在 痞客邦 PIXNET 留言(0) 人氣()

«12 3