This Domain(Admin5.com) is for Sale:

中文的版用JavaScript实现超酷的“网页时钟”

时间:2007-10-22  来源:不详  作者:林子

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; 内容来自dedecms
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;

看完这篇,您有何感觉呢?

文章评论

共有位Admini5网友发表了评论 查看完整内容

24小时热门信息