#1
時間顯示 - 蛙 (Administrator) 發表於 18-5-2012 18:22
<DIV id=postmessage_42196 class=t_msgfont><FONT size=3><FONT color=#0000ff>如不能顯示語法效果,可貼去本站</FONT></FONT><A href="http://www.bunbun000.com/html/index.htm" target=_blank><FONT size=3><FONT color=red>語法測試板</FONT></FONT></A><FONT size=3><FONT color=#0000ff>試看</FONT></FONT><BR><FONT size=3><FONT color=#0000ff></FONT></FONT><BR><FONT size=3><FONT color=#0000ff></FONT></FONT><BR><FONT size=3><FONT color=#0000ff></FONT></FONT><BR><BR><BR><BR><BR><FONT size=2><FONT color=#0000ff><center> <script language="JavaScript">document.write("<span id='clock'></span>"
;<BR>var now,hours,minutes,seconds,timeValue; function showtime(){ now = new Date(); <BR>hours = now.getHours(); minutes = now.getMinutes(); seconds = now.getSeconds(); <BR>timeValue = (hours >= 12) ? "下午 " : "上午 "; timeValue += ((hours > 12) ? hours - 12 : hours) + " 時"; <BR>timeValue += ((minutes < 10) ? " 0" : " "
+ minutes + " 分";<BR>timeValue += ((seconds < 10) ? " 0" : " "
+ seconds + " 秒";<BR>clock.innerHTML = timeValue; setTimeout("showtime()",100); }<BR>showtime();</script> </center></FONT></FONT></DIV>
#2
複製上列語法 - 蛙 (Administrator) 發表於 25-5-2013 16:15
<form name="copy">
<textarea cols="40" name="txt" rows="4" style="BACKGROUND-COLOR:#ffffff; COLOR:#000000; FONT-SIZE:9pt">
<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>
</textarea><br>
<input onclick="javascript:this.form.txt.focus();this.form.txt.select();" type="button" value="全選">
</form>
<br>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4078143172638881";
/* 336X280 */
google_ad_slot = "3268225205";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>