HTMLÏÔʾÈÕÆÚʱ¼ä´úÂë [js ÌØÐ§´úÂë]
Ò»ÖÖ£º
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>¼æÈÝFireFoxµÄµ±Ç°Ê±¼äµÄJS½Å±¾</title>
</head>
<body>
<DIV id=time>µ±Ç°Ê±¼ä
<SCRIPT>document.getElementById('time').innerHTML=new Date().toLocaleString()+' ÐÇÆÚ'+'ÈÕÒ»¶þÈýËÄÎåÁù'.charAt(new Date().getDay());setInterval("document.getElementById('time').innerHTML=new Date().toLocaleString()+' ÐÇÆÚ'+'ÈÕÒ»¶þÈýËÄÎåÁù'.charAt(new Date().getDay());",1000);</SCRIPT>
</DIV>
</body>
</html>
¶þÖÖ£º
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>¼æÈÝFireFoxµÄµ±Ç°Ê±¼äµÄJS½Å±¾</title>
<mce:script type="text/javascript"><!--
function startTime()
{
var today=new Date()
var years=today.getFullYear();
var months=today.getMonth();
var d=today.getDate()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
months=months+1
months=checkTime(months)
d=checkTime(d)
m=checkTime(m)
s=checkTime(s)
var weekday=new Array(7)
weekday[0]="ÐÇÆÚÈÕ"
weekday[1]="ÐÇÆÚÒ»"
weekday[2]="ÐÇÆÚ¶þ"
weekday[3]="ÐÇÆÚÈý"
weekday[4]="ÐÇÆÚËÄ"
weekday[5]="ÐÇÆÚÎå"
weekday[6]="ÐÇÆÚÁù"
var w=weekday[today.getDay()]
document.getElementById('ShowTime').innerHTML=years+"Äê"+months+"ÔÂ"+d+"ÈÕ "+w+" "+h+":"+m+":"+s;
t=setTimeout('startTime()',500)
}
function checkTime(i)
{
if (i<10)
{i="0" + i}
return i
}
// --></mce:script>
</head>
<body onLoad="startTime()">
<div id="ShowTime"></div>
ÈýÖÖ£º
<SCRIPT>
var d = new Date();
document.write(d.getFullYear() + "Äê" +(d.getMonth() + 1) + "ÔÂ" + d.getDate() + "ÈÕ");
document.write(' ÐÇÆÚ'+'ÈÕÒ»¶þÈýËÄÎåÁù'.charAt(new Date().getDay()));
</SCRIPT>
</body>
</html>
Ïà¹ØÎĵµ£º
±¾½ÚÖеÄÖ÷ÌâÃèÊöÈçºÎʹÓà Visual Web Developer ¹¤¾ßÏäµÄ“HTML”Ñ¡ÏÉ쵀 ASP.NET Web ·þÎñÆ÷¿Ø¼þ¡£
ĬÈÏÇé¿öÏ£¬·þÎñÆ÷ÎÞ·¨Ê¹Óà ASP.NET ÍøÒ³É쵀 HTML ÔªËØ£»ÕâÐ©ÔªËØ±»ÊÓΪ´«µÝ¸øä¯ÀÀÆ÷µÄ²»Í¸Ã÷Îı¾¡£µ«ÊÇ£¬Í¨¹ý½« HTML ÔªËØ×ª»»³É HTML ·þÎñÆ÷¿Ø¼þ£¬¿ÉÒÔ½«ËüÃǹ«¿ªÎª ......
<html>
<script language="javascript" defer>
function isvalid()
{
Input_Str=document.getElementById("tsinput").value;
document.getElementById("ts").innerHTML=Input_Str;
if(Input_Str!=document.getElementById("ts").innerText)
alert("include Html Element... ......
Á½ÖÖ·½·¨:´óͬСÒì /*
*º¯Êý¹¦ÄÜ£º´Óhref»ñµÃ²ÎÊý
*sHref: http://www.cscenter.com.cn/arg.htm?arg1=d&arg2=re
*sArgName:arg1, arg2
*return: the value of arg. d, re
*/
function GetArgsfromHref(sHref, sArgName)
{
......
Ò»£®ÊôÐÔ£º
src£º¸ÃÊôÐÔÖ¸¶¨ÍⲿJavaScriptÎļþµÄµØÖ·£¬¿ÉÒÔ¿çÓò¡£Èç¹ûÖ¸¶¨Á˸ÃÊôÐÔ£¬ÄÇôscript±êÇ©ÖеÄÄÚÈݾͻᱻºöÂÔ¡£
type£ºÖ¸¶¨ËùʹÓõĽű¾ÓïÑÔ£¬¿ÉÒÔ¸²¸ÇĬÈϵĽű¾ÓïÑÔ£¨¼´ÔÚ<META http-equiv="Content-Script-Type" content="type">Öж¨ÒåµÄ½Å±¾ÀàÐÍ
£©¿ª·¢Õß±ØÐëÖ¸¶¨¸ÃÊôÐÔ£¬¸ÃÊôÐÔûÓÐĬÈÏÖµ¡ ......