网页显示时间代码和倒计时代码大全
数字时钟代码

数字时钟代码1. 介绍数字时钟是一种常见的显示时间的装置,它通过数字显示屏显示当前的小时和分钟。
本文档将介绍如何编写一个简单的数字时钟代码。
2. 代码实现以下是一个基本的数字时钟代码实现示例:import timewhile True:current_time = time.localtime()hour = str(current_time.tm_hour).zfill(2)minute = str(current_time.tm_min).zfill(2)second = str(current_time.tm_sec).zfill(2)clock_display = f"{hour}:{minute}:{second}"print(clock_display, end="\r")time.sleep(1)代码说明:- `time.localtime()` 函数返回当前时间的结构化对象,包括小时、分钟和秒等信息。
- `str(current_time.tm_hour).zfill(2)` 将小时转换为字符串,并使用 `zfill()` 方法填充到两位数。
- `str(current_time.tm_min).zfill(2)` 和`str(current_time.tm_sec).zfill(2)` 同理处理分钟和秒。
- 使用 f-string 格式化字符串 `clock_display`,将小时、分钟和秒显示为 `` 的形式。
- `print(clock_display, end="\r")` 使用 `\r` 实现覆盖打印,使得时钟在同一行连续显示。
- `time.sleep(1)` 让程序每隔一秒更新一次时间。
请注意,上述代码需要在支持 Python 的环境中运行。
3. 结束语通过以上的代码实现,我们可以编写一个简单的数字时钟。
网页显示时间代码和倒计时代码大全

网页显示时间代码和倒计时代码大全:<SCRIPT language=JavaScript>var enabled = 0; today = new Date();var day; var date;if(today.getDay()==0) day = "星期日"if(today.getDay()==1) day = "星期一"if(today.getDay()==2) day = "星期二"if(today.getDay()==3) day = "星期三"if(today.getDay()==4) day = "星期四"if(today.getDay()==5) day = "星期五"if(today.getDay()==6) day = "星期六"document.fgColor = " cadet";date1 = "<font size=5 face=宋体 color=0000ff>" + (today.getYear()) + "年" + (today.getMonth() + 1 ) + "月" + today.getDate() + "日 " + "</font>";date2 = "<font size=5 face=宋体 color=ff0000>" + day + "</font>";document.write("<center>" + date1.fontsize(2) + date2.fontsize(2) + "</center>");</SCRIPT><P class=t_msgfont align=center><BR><SPAN id=liveclock 15px? height: 109px; style?="width:"><FONT color=#ff0f00 size=5>17:47:26</FONT></SPAN><SCRIPT language=javascript>function www_helpor_net(){var Digital=new Date()var hours=Digital.getHours()var minutes=Digital.getMinutes()var seconds=Digital.getSeconds()if(minutes<=9)minutes="0"+minutesif(seconds<=9)seconds="0"+secondsmyclock="<font size=5 color=0000ff>"+hours+":"+minutes+":"+seconds+"</font>"if(yers){yers.liveclock.document.write(myclock) yers.liveclock.document.close()}else if(document.all)liveclock.innerHTML=myclocksetTimeout("www_helpor_net()",1000)}www_helpor_net();//--></SCRIPT>中文显示的时候保存为.js文件再用网页调用出现乱码。
HTML网页文件显示时间代码和倒计时代码

document.write("<center>" + date1.fontsize(2) + date2.fontsize(2) + "</center>");
网页显示时间代码和倒计时代码大全:
<SCRIPT language=JavaScript>
var enabled = 0; today = new Date();
var day; var date;
if(today.getDay()==0) day = "星期日"
var timevalue = "<FONT COLOR=black>" + ((hours >12) ? hours -12 :hours); timevalue += ((minutes < 10) ? "<BLINK>
<FONT COLOR=black>:</FONT></BLINK>0" : "<BLINK><FONT COLOR=black>:</FONT></BLINK>") + minutes+"</FONT></FONT>";
}
timeString = xfile+hours+minutes+seconds;
JS实现动态倒计时功能(天数时分秒)

JS实现动态倒计时功能(天数时分秒)在JS中,可以使用`setInterval(`方法来实现动态倒计时功能。
以下是一个完成该功能的完整代码示例:```javascript//获取倒计时容器元素const countdownContainer =document.getElementById('countdown');//设置倒计时的目标日期和时间const targetDate = new Date('October 31, 202400:00:00').getTime(;//更新倒计时function updateCountdow//获取当前日期和时间const currentDate = new Date(.getTime(;//计算距离目标日期和时间的毫秒数const distance = targetDate - currentDate;//计算剩余的天数、小时、分钟和秒数const days = Math.floor(distance / (1000 * 60 * 60 * 24));const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));const seconds = Math.floor((distance % (1000 * 60)) / 1000);//将剩余时间显示在倒计时容器中countdownContainer.innerHTML = `剩余时间:${days}天 ${hours}时 ${minutes}分 ${seconds}秒`;//判断是否达到目标日期和时间,如果达到则停止倒计时if (distance < 0)clearInterval(countdownInterval);countdownContainer.innerHTML = '倒计时已结束';}//每秒钟更新一次倒计时const countdownInterval = setInterval(updateCountdown, 1000);```在上述代码中,首先获取了用于显示倒计时的容器元素`countdownContainer`。
网页设计中10个常用简单代码

网页设计中10个常用简单代码1. 让文字不停地滚动<MARQUEE>滚动文字(循环滚动)</MARQUEE>其它滚动效果:<marquee direction=left>从右向左移!</marquee><p><marquee direction=right>从左向右移!</marquee><p><marquee behavior=scroll>一圈一圈绕着走!</marquee><p><marquee behavior=slide>只走一次就歇了!</marquee><p><marquee behavior=alternate>来回走!</marquee><p><marquee loop=3 width=50% behavior=scroll>只走 3 趟</marquee><p><marquee loop=3 width=50% behavior=slide>只走 3 趟!</marquee><p><marquee loop=3 width=50% behavior=alternate>只走 3 趟!</marquee><p> <marquee scrollamount=20>走得好快哟!</marquee>2. 2秒后关闭当前当前页面<script language="JavaScript"><!--setTimeout('window.close();',2000);--></script>3. 2秒后自动载入指定网页<head><meta http-equiv="refresh" content="2;URL=http://你的网址"></head>4.节日、重大事件倒计时<Script Language="JavaScript">var timedate= new Date("October 1,2011");var times="国庆节";var now = new Date();var date = timedate.getTime() - now.getTime();var time = Math.floor(date / (1000 * 60 * 60 * 24));if (time >= 0)document.write("现在离"+times+"还有: "+time +"天")</Script>5. 不同时间段显示不同问候语<Script Language="JavaScript"><!--var text=""; day = new Date( ); time = day.getHours( );if (( time>=0) && (time < 7 ))text="夜猫子,要注意身体哦!"if (( time >= 7 ) && (time <12))text="今天的阳光真灿烂啊,你那个朋友呢?"if (( time >= 12) && (time <14))text="午休时间。
各种页面定时跳转(倒计时跳转)代码总结

各种页⾯定时跳转(倒计时跳转)代码总结⼀、使⽤setTimeout函数实现定时跳转(如下代码要写在body区域内)<script type="text/javascript">//3秒钟之后跳转到指定的页⾯ setTimeout(window.location.href='',3);</script> 或者: <script language="JavaScript" type="text/javascript">function Redirect(){window.location = "add.jsp"; //要跳转的页⾯}setTimeout('Redirect()', 3000); //第⼆个参数是时间,单位毫秒</script>⼆、html代码实现,在页⾯的head区域块内加上如下代码<!--5秒钟后跳转到指定的页⾯--><meta http-equiv="refresh" content="5;url=" />三、使⽤脚本语⾔(就⼀句简单)<%response.setHeader("Refresh","3;url=index.jsp");%>四、稍微复杂点,多见于登陆之后的定时跳转() ⽅法⼀:<!doctype html><head><meta charset=utf-8" /><title>js定时跳转页⾯的⽅法</title></head><body><script> var t=10;//设定跳转的时间 setInterval("refer()",1000); //启动1秒定时 function refer(){ if(t==0){ location=""; //#设定跳转的链接地址 } document.getElementById('show').innerHTML=""+t+"秒后跳转到百度"; // 显⽰倒计时 t--; // 计数器递减 //本⽂转⾃: }</script><span id="show"></span></body></html> ⽅法⼆:<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "/TR/html4/loose.dtd"><html><head><!-- 完成页⾯定时的跳转 --><meta http-equiv="refresh" content="5;url=/Web_01/main.html"><title>Insert title here</title></head><body onload="run()">页⾯将在<span id="spanId">5</span>秒后跳转!!</body><br><script type="text/javascript">// 页⾯⼀加载完成,该⽅法就会执⾏// 读秒,⼀秒钟数字改变⼀次var x = 5;function run(){// 获取到的是span标签的对象var span = document.getElementById("spanId");// 获取span标签中间的⽂本span.innerHTML = x;x--;// 再让run⽅法执⾏呢,⼀秒钟执⾏⼀次window.setTimeout("run()", 1000);}</script></html> ⽅法三:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title></title><script type="text/javascript"> function countDown(secs,surl){ var jumpTo = document.getElementById('jumpTo'); jumpTo.innerHTML=secs; if(--secs>0){ setTimeout("countDown("+secs+",'"+surl+"')",1000); } else{ location.href=surl; -ma } }</script></head><body><h1>提交成功</h1><a href=""><span id="jumpTo">3</span>秒后系统会⾃动跳转,也可点击本处直接跳</a> <script type="text/javascript">countDown(3,'/');</script></body></html>。
网页常用代码大全

网页常用代码大全10-07-26 05:13 发表于:《草人推手团》分类:未分类onselectstart ="return false"onselect="document.selection.empty()"oncopy="document.selection.empty()" onbeforecopy="returnfalse"onmouseup="document.selection.empty()">2、消除ie6自动出现的图像工具栏,设置 GALLERYIMG属性为false或no .<IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px"GALLERYIMG="no">3、防止点击空链接时,页面往往重置到页首端。
代码"javascript :void(null)"代替原来的"#"标记4、如何避免别人把你的网页放在框架中<script language="javascript"><!--if (self!=top) --></script>5、页面定时刷新<meta http-equiv="Refresh" content="秒" >6、页面定时转向新的地址<meta http-equiv="refresh" content="秒;URL=url">7、关闭窗口,这个是不会弹出提示直接关的:把如下代码加入<body>区域中<OBJECT id=closes type="application/x-oleobject"classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><param name="Command" value="Close"> </object><script language="javascript">function shutwin()</script><a href="javascript :shutwin();">关闭本窗口</a>经验甚于理论,事实胜于雄辩。
倒计时代码

倒计时代码团购网出现,好多人需要倒计时代码我帖一个出来index.php/*** 将GMT时间戳格式化为用户自定义时区日期** @param string $format* @param integer $time 该参数必须是一个GMT的时间戳** @return string*/function local_date($format, $time = NULL){$timezone = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : $GLOBALS['_CFG']['timezone'];if ($time === NULL){$time = gmtime();}elseif ($time <= 0){return '';}$time += ($timezone * 3600);return date($format, $time);}复制代码function chagetime($time){$time = local_date($GLOBALS['_CFG']['time_format'], $time); //echo $time;exit;$time = explode(" ",$time);//分割时间$date = $time[0];$time=$time[1];$date=explode("-",$date);$year = (int)$date[0];$month = (int)$date[1];$day = (int)$date[2];/*$time=explode(":",$time);$hour =$time[0];$min =$time[1];$sec =(int)$time[2];$hour = (int)(24-$hour);$min =(int)(60-$min);$time=$hour.":".$min.":".$sec;*/switch ($month){case 1:$month_name = "Jan";break;case 2:$month_name = "Feb"; break;case 3:$month_name = "Mar"; break;case 4:$month_name = "Apr"; break;case 5:$month_name = "May"; break;case 6:$month_name = "Jun"; break;case 7:$month_name = "Jul"; break;case 8:$month_name = "Aug"; break;case 9:$month_name = "Sep"; break;case 10:$month_name = "Oct";break;case 1:$month_name = "Nov";break;case 2:$month_name = "Dec";break;}return $month_name." ".$day." ".$year." ".$time;}复制代码function countDown(){var i;var objArray =document.getElementsByTagName("label"); //alert(objArray.length);for (i=0;i<(objArray.length);i++){if (objArray[i].id.indexOf("article_")>-1){objHid = document.getElementById("hid_article_" + objArray[i].id.substring(objArray[i].id.indexOf("_")+1));//objHid.value就是对应的时间值,然后改下面就行了var d=Date.parse(objHid.value);var today=new Date();var time=d-today;var 时间=objArray[i];if(Math.floor(time)<=0){时间.innerHTML='抢购时间已过,谢谢您的关注!';}Else{var 天=Math.floor(time/(1000*60*60*24));var 小时=Math.floor(time/(1000*60*60))%24;var 分=Math.floor(time/(1000*60))%60;var 秒=Math.floor(time/1000)%60;时间.innerHTML=天+' 天'+小时+'小时'+分+'分'+秒+'秒';时间.style.fontSize='14px';}}}setTimeout('countDown()',1000);}countDown();</script><label id='article_1'></label><input type='hidden' id='hid_article_1'。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
ÍøÒ³ÏÔʾʱ¼ä´úÂëºÍµ¹¼ÆÊ±´úÂë´óÈ«.txtؼ¦á£þϲ»¶µÄ¸è£¬¾²¾²µÄÌý£¬Ï²»¶µÄÈË£¬Ô¶Ô¶µÄ¿´ÎÒЦÁ˵±³õÄ㲻ͦ°ÁµÄÂðÏÖÔÚÄúÕâÊÇÓÖÍæÄijöÄØ£¿ÍøÒ³ÏÔʾʱ¼ä´úÂëºÍµ¹¼ÆÊ±´úÂë´óÈ«:<SCRIPT language=JavaScript>var enabled = 0; today = new Date();var day; var date;if(today.getDay()==0) day = "ÐÇÆÚÈÕ"if(today.getDay()==1) day = "ÐÇÆÚÒ»"if(today.getDay()==2) day = "ÐÇÆÚ¶þ"if(today.getDay()==3) day = "ÐÇÆÚÈý"if(today.getDay()==4) day = "ÐÇÆÚËÄ"if(today.getDay()==5) day = "ÐÇÆÚÎå"if(today.getDay()==6) day = "ÐÇÆÚÁù"document.fgColor = " cadet";date1 = "<font size=5 face=ËÎÌå color=0000ff>" + (today.getYear()) + "Äê" + (today.getMonth() + 1 ) + "ÔÂ" + today.getDate() + "ÈÕ " + "</font>";date2 = "<font size=5 face=ËÎÌå color=ff0000>" + day + "</font>";document.write("<center>" + date1.fontsize(2) + date2.fontsize(2) + "</center>"); </SCRIPT><P class=t_msgfont align=center><BR><SPAN id=liveclock 15px? height: 109px; style?="width:"><FONT color=#ff0f00 size=5>17:47:26</FONT></SPAN><SCRIPT language=javascript>function www_helpor_net(){var Digital=new Date()var hours=Digital.getHours()var minutes=Digital.getMinutes()var seconds=Digital.getSeconds()if(minutes<=9)minutes="0"+minutesif(seconds<=9)seconds="0"+secondsmyclock="<font size=5 color=0000ff>"+hours+":"+minutes+":"+seconds+"</font>"if(yers){yers.liveclock.document.write(myclock)yers.liveclock.document.close()}else if(document.all)liveclock.innerHTML=myclocksetTimeout("www_helpor_net()",1000)}www_helpor_net();//--></SCRIPT>ÖÐÎÄÏÔʾµÄʱºò±£´æÎª.jsÎļþÔÙÓÃÍøÒ³µ÷ÓóöÏÖÂÒÂë¡£ÓÃuft-8±àÂë±£´æ.jsÎļþ¼´¿É½â¾öÂÒÂëÎÊÌâ¡£---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------ʵʱÓÎ×ßµÄÊý×ÖʱÖÓ<script>function tick() {var hours, minutes, seconds, xfile;var intHours, intMinutes, intSeconds;var today;today = new Date();intHours = today.getHours();intMinutes = today.getMinutes();intSeconds = today.getSeconds();if (intHours == 0) {hours = "12:";xfile = "ÎçÒ¹";} else if (intHours < 12) {hours = intHours+":";xfile = "ÉÏÎç";} else if (intHours == 12) {hours = "12:";xfile = "ÕýÎç";} else {intHours = intHours - 12hours = intHours + ":";xfile = "ÏÂÎç";}if (intMinutes < 10) {minutes = "0"+intMinutes+":";} else {minutes = intMinutes+":";}if (intSeconds < 10) {seconds = "0"+intSeconds+" ";} else {seconds = intSeconds+" ";}timeString = xfile+hours+minutes+seconds;Clock.innerHTML = timeString;window.setTimeout("tick();", 100);}window.onload = tick;</script>µÚ1²½.½«ÏÂÃæµÄ´úÂë¼ÓÈëhtmlÎļþÈÎÒâÐèÒªµÄµØ·½<div id="Clock" align="center" style="font-size: 20; color:#000000"></div>Äã¿ÉÒÔ×ÔÐиü¸ÄÑùʽ£¡¡¡---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------ÏÔʾÄêÔÂÈÕ¸ñʽµÄʱ¼ä´úÂë<script language=javascript>today=new Date();function initArray(){this.length=initArray.arguments.lengthfor(var i=0;i<this.length;i++)this[i+1]=initArray.arguments[i] }var d=new initArray("ÐÇÆÚÈÕ","ÐÇÆÚÒ»","ÐÇÆÚ¶þ","ÐÇÆÚÈý","ÐÇÆÚËÄ","ÐÇÆÚÎå","ÐÇÆÚÁù");document.write("<font color=##000000 style='font-size:9pt;font-family: ËÎÌå'> ",today.getYear(),"Äê",today.getMonth()+1,"ÔÂ",today.getDate(),"ÈÕ",d[today.getDay()+1],"</font>" );</script>¡¡---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------ÏÔʾÈÕÆÚ£¬ÐÇÆÚ£¬Ê±¼ä¸ñʽµÄ´úÂë<script language="javascript"><!---today=new Date();var hours = today.getHours();var minutes = today.getMinutes();var seconds = today.getSeconds();var timevalue = "<FONT COLOR=black>" + ((hours >12) ? hours -12 :hours); timevalue += ((minutes < 10) ? "<BLINK><FONT COLOR=black>:</FONT></BLINK>0" : "<BLINK><FONT COLOR=black>:</FONT></BLINK>") + minutes+"</FONT></FONT>";timevalue += (hours >= 12) ? "<FONT COLOR=blue><I><B>pm</B></I></FONT>" : "<FONT COLOR=blue><B><I>am</I></B></FONT>";function initArray(){this.length=initArray.arguments.lengthfor(var i=0;i<this.length;i++)this[i+1]=initArray.arguments[i] }var d=new initArray("& lt;font color=RED>ÐÇÆÚÈÕ","<font color=black>ÐÇÆÚÒ»","< font color=black>ÐÇÆÚ¶þ","<font color=black>ÐÇÆÚÈý","<font color=black>ÐÇÆÚËÄ","<font color=black>ÐÇÆÚÎå","<font color=red>ÐÇÆÚÁù"); document.write("<font color=black>",today.getYear(),"<font color=black> Äê","<font color=black>",today.getMonth()+1,"<font color=black>ÔÂ","<font color=black>",today.getDate(),"<font color=black>ÈÕ </FONT>",d[today.getDay()+1]," ",timevalue); //--></script>---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------ÏÔʾÀ´·ÃÕßµÄÍ£Áôʱ¼ä<script language="javascript">var ap_name = navigator.appName;var ap_vinfo = navigator.appVersion;var ap_ver = parseFloat(ap_vinfo.substring(0,ap_vinfo.indexOf('(')));var time_start = new Date();var clock_start = time_start.getTime();var dl_ok=false;function init (){if(ap_name=="Netscape" && ap_ver>=3.0)dl_ok=true;return true;}function get_time_spent (){var time_now = new Date();return((time_now.getTime() - clock_start)/1000);}function show_secs () // show the time user spent on the side{var i_total_secs = Math.round(get_time_spent());var i_secs_spent = i_total_secs % 60;var i_mins_spent = Math.round((i_total_secs-30)/60);var s_secs_spent = "" + ((i_secs_spent>9) ? i_secs_spent : "0" + i_secs_spent); var s_mins_spent = "" + ((i_mins_spent>9) ? i_mins_spent : "0" + i_mins_spent); document.fm0.time_spent.value = s_mins_spent + ":" + s_secs_spent;window.setTimeout('show_secs()',1000);}// --></script><FORM name="fm0" onSubmit="0"><FONT COLOR="#6060FF">Í£Áôʱ¼ä:</FONT><INPUT type="text" name="time_spent" size=7 onFocus="this.blur()"></FORM>µÚ¶þ²½£ºÔÚÄãÖ÷Ò³Ô´Îļþ<body>ÖмÓÈëÏÂÃæ´úÂëµÄÀ¼É«²¿·Ö<BODY onLoad="init(); window.setTimeout('show_secs()',1);">---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------¡¡ÏÔʾµ±Ç°ÈÕÆÚÓëʱ¼äµÄ¸ñʽ<script language="javascript"><!--now = new Date()hour = now.getHours()if (hour < 12) {document.write("ÏÖÔÚÊÇ: " + now.toLocaleString())} else if (hour < 18){document.write("ÏÖÔÚÊÇ: " + now.toLocaleString())} else if (hour >= 18) {document.write("ÏÖÔÚÊÇ: " + now.toLocaleString())}// --></script>---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------¡¡ä¯ÀÀÆ÷״̬À¸ÏÔʾµÄʱÖÓ<BODY onLoad="run(); timerONE=window.setTimeout"></BODY><SCRIPT LANGUAGE="javascript"><!-- HidetimeID = null;timeRunning = false;function stop () {if(timeRunning)clearTimeout(timeID);timeRunning = false;}function time () {tick = new Date();hours = tick.getHours();minutes = tick.getMinutes();seconds = tick.getSeconds();day = tick.getDay();month = tick.getMonth();date = tick.getDate();year = tick.getYear();current = "" + ((hours >12) ? hours -12 :hours)current += ((minutes < 10) ? ":0" : ":") + minutescurrent += ((seconds < 10) ? ":0" : ":") + secondscurrent += (hours >= 12) ? " P.M." : " A.M."if(day==0){var weekday = " ÐÇÆÚÈÕ"}if(day==1){var weekday = " ÐÇÆÚÒ»"}if(day==2){var weekday = " ÐÇÆÚ¶þ"}if(day==3){var weekday = " ÐÇÆÚÈý"}if(day==4){var weekday = " ÐÇÆÚËÄ"}if(day==5){var weekday = " ÐÇÆÚÎå"}if(day==6){var weekday = " ÐÇÆÚÁù"}current +=(weekday)window.status=current;timeID = setTimeout("time()",1000);timeRunning = true;}function run(){stop();time();}//--></SCRIPT>---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------¡¡ÏÔʾ×îºó¸üÐÂʱ¼ä´úÂë<SCRIPT language=javascript><!--hide script from old browsersdocument.write("×îºó¸üÐÂʱ¼ä: " + stModified + "")// end hiding --></SCRIPT>---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------ʵʱ×ß¶¯µÄÊý×ÖʱÖÓ<script>function tick() {var hours, minutes, seconds, xfile;var intHours, intMinutes, intSeconds;var today;today = new Date();intHours = today.getHours();intMinutes = today.getMinutes();intSeconds = today.getSeconds();if (intHours == 0) {hours = "12:";xfile = "ÎçÒ¹";} else if (intHours < 12) {hours = intHours+":";xfile = "ÉÏÎç";} else if (intHours == 12) {hours = "12:";xfile = "ÕýÎç";} else {intHours = intHours - 12hours = intHours + ":";xfile = "ÏÂÎç";}if (intMinutes < 10) {minutes = "0"+intMinutes+":";} else {minutes = intMinutes+":";}if (intSeconds < 10) {seconds = "0"+intSeconds+" ";} else {seconds = intSeconds+" ";}timeString = xfile+hours+minutes+seconds;Clock.innerHTML = timeString;window.setTimeout("tick();", 100);}window.onload = tick;</script><div id="Clock" style="font-size: 20; color:#000000"></div>¡¡---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------¸ù¾Ý²»Í¬µÄʱ¼äÏÔʾ²»Í¬µÄÎʺòÓï·½·¨£ºÔÚÖ÷Ò³ÖÐÄãÐèÒªµÄµØ·½¼ÓÈëÒÔÏ´úÂ룺<script language="LiveScript">now = new Date(),hour = now.getHours()if(hour < 6){document.write("Ã÷Ìì²»ÓÃÉϰàÁËÂð?")}else if (hour < 8){document.write("ȫеÄÒ»Ìì!")}else if (hour < 12){document.write("Ôç°²!")}else if (hour < 14){document.write("ÍâÃæÌ«Ñô´óÂð£¿")}else if (hour < 18){document.write("Îç°²!")}else if (hour < 22){document.write("ÍíÉϺÃ!")}else if (hour < 24){document.write("Ò¹ÉîÁË! ҪעÒâÉíÌåѽ! ×£Äã×ö¸öºÃÃÎ!")}// --></script>˵Ã÷£¬¿ÉÒÔ×ÔÐÐÐ޸ijö¸üºÃ¸ü¶àµÄÎʺòÓ¡¡---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------Ò»¸öºÜ¿áµÄ͸Ã÷ʱÖÓ´úÂë·½·¨£ºÔÚÒ³ÃæÖÐÄãÐèÒªµÄµØ·½¼ÓÈëÏÂÃæµÄ´úÂë<STYLE type=text/css>BODY {COLOR: #000000; FONT-FAMILY: "ËÎÌå"; FONT-SIZE: 9pt; LINE-HEIGHT: 13pt}TD {COLOR: #000000; FONT-FAMILY: "ËÎÌå"; FONT-SIZE: 9pt; LINE-HEIGHT: 13pt}A:visited {COLOR: #000080;text-decoration:none}a:link { text-decoration:none }a:hover { text-decoration:underline }.f12 {font-size:12px;}.f13 {font-size:14.9px; LINE-HEIGHT: 120%}.f24 {font-size:24px;LINE-HEIGHT: 120%}.f14 {font-size:14.9px; LINE-HEIGHT: 170%}</STYLE><script LANGUAGE="javascript">Zp=670;H='....';H=H.split('');M='.....';M=M.split('');S='......';S=S.split('');Y p=0;Xp=0;Yb=8;Xb=8;d_=12;ns=(yers)?1:0;fCol='222222';sCol='ff0000';mCol='0000ee';hCol='green'; if (ns){dgts='1 2 3 4 5 6 7 8 9 10 11 12';dgts=dgts.split(' ');for (i=0;i<d_;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<d_+1;i++){document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Ari al,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('<divstyle="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){Yp=window.pageYOffset+window.innerHeight-60;Xp=80;}else{Yp=document.body.scrollTop+window.document.body.clientHeight-60;Xp=document.bod y.scrollLeft+60;}if (ns){for (i=0;i<d_;++i){yers["nsDigits"+i].top=Yp-5+40*Math.sin(-0.49+d_+i/1.9);y ers["nsDigits"+i].left=Xp-15+40*Math.cos(-0.49+d_+i/1.9);}for(i=0;i<S.length;i++){yers["nx"+i].top=Yp+i*Yb*Math.sin(sec);document. layers["nx"+i].left=Xp+i*Xb*Math.cos(sec);}for(i=0;i<M.length;i++){yers["ny"+i].top=Yp+i*Yb*Math.sin(min);document. layers["ny"+i].left=Xp+i*Xb*Math.cos(min);}for(i=0;i<H.length;i++){yers["nz"+i].top=Yp+i*Yb*Math.sin(hrs);document. layers["nz"+i].left=Xp+i*Xb*Math.cos(hrs);}}else{for(i=0;i<d_;++i){ieDigits[i].style.pixelTop=Yp-15+40*Math.sin(-0.49+d_+i/1.9);ieDigits[i].style.pixelLeft=Xp-14+40*Math.cos(-0.49+d_+i/1.9)+Zp;}for(i=0;i<S.length;i++){x[i].style.pixelTop=Yp+i*Yb*Math.sin(sec);x[i].style.pixelLeft=Xp+i*Xb*Math.cos(s ec)+Zp;}for (i=0;i<M.length;i++){y[i].style.pixelTop=Yp+i*Yb*Math.sin(min);y[i].style.pixelLeft=Xp+i*Xb*Math.cos(m in)+Zp;}for (i=0;i<H.length;i++){z[i].style.pixelTop=Yp+i*Yb*Math.sin(hrs);z[i].style.pixelLeft=Xp+i*Xb*Math.cos(h rs)+Zp;}}setTimeout('clock()', 50);}if (yers || document.all) {window.onload=clock;}window.onload=clock;</script>---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------ÐÎÈç½ñÌìÊÇ2008Äê8ÔÂ27ÈÕ£¬ÐÇÆÚÈýµÄ´úÂë<script>var mydate=new Date()var year=mydate.getYear()if (year < 1000)year+=1900var day=mydate.getDay()var month=mydate.getMonth()var daym=mydate.getDate()if (daym<10)daym="0"+daymvar dayarray=new Array("ÐÇÆÚÌì","ÐÇÆÚÒ»","ÐÇÆÚ¶þ","ÐÇÆÚÈý","ÐÇÆÚËÄ","ÐÇÆÚÎå","ÐÇÆÚÁù")var montharray=new Array("1","2","3","4","5","6","7","8","9","10","11","12") document.write("½ñÌìÊÇ"+year+"Äê"+montharray[month]+"ÔÂ"+daym+"ÈÕ"+"£¬"+dayarray [day])</script>---------------------------------------------------------·Ö¸îÏß-----------------------------------------------------ʵʱµ¹¼ÆÊ±´úÂ룬¿ÉÒÔÉ趨ÆÚÏÞ£¡<!--µ¥Î»£ºÃë-->Ê£Óàʱ¼ä£º<span id="endtime">10</span><script type="text/javascript">var CID = "endtime";if(window.CID != null){var iTime = document.getElementById(CID).innerText;var Account;RemainTime();}function RemainTime(){var iDay,iHour,iMinute,iSecond;var sDay="",sHour="",sMinute="",sSecond="",sTime="";if (iTime >= 0){iDay = parseInt(iTime/24/3600);if (iDay > 0){sDay = iDay + "Ìì";}iHour = parseInt((iTime/3600)%24);if (iHour > 0){sHour = iHour + "Сʱ";}iMinute = parseInt((iTime/60)%60);if (iMinute > 0){sMinute = iMinute + "·ÖÖÓ";}iSecond = parseInt(iTime%60);if (iSecond >= 0){sSecond = iSecond + "Ãë";}if ((sDay=="")&&(sHour=="")){sTime="<span style='color:darkorange'>" + sMinute+sSecond + "</font>"; }else{sTime=sDay+sHour+sMinute+sSecond;}if(iTime==0){clearTimeout(Account);sTime="<span style='color:green'>ʱ¼äµ½ÁË£¡</span>";}else{Account = setTimeout("RemainTime()",1000);}iTime=iTime-1;}else{sTime="<span style='color:red'>µ¹¼ÆÊ±½áÊø£¡</span>";}document.getElementById(CID).innerHTML = sTime;}</script></body></html>。