³õѧJavaScript ʱÖÓÎÊÌâ - Web ¿ª·¢ / JavaScript
<html>
<head>
<title>look the status change</title>
</head>
<body>
<script type="text/javascript">
var nowtime ;
var year ;
var month ,date,hours,minutes,seconds,all;
function aaa()
{
nowtime = new Date();
year = nowtime.getYear();
month = nowtime.getMonth()+1;
date = nowtime.getDate();
hours = nowtime.getHours();
minutes = nowtime.getMinutes();
seconds = nowtime.getSeconds();
all = year + " "+month +" "+ date +" "+ hours +":"+minutes+":"+seconds;
document.form.text.value=all;
window.setTimeout("aaa();",1000);
}
aaa();
</script>
</body>
</html>
Ò»Ö±±¨´í ²»Çå³þ´íÔÚÄÄÀï Çë¸ßÊÖÖ¸½Ì
document.form.text
ûtextÕâ¸ö¶ÔÏóÂïÄã
<html>
<head>
<title>look the status change</title>
</head>
<body>
<input type="text" name="text" id="text" />
<script type="text/javascript">
var nowtime ;
var year ;
var month ,date,hours,minutes,seconds,all;
function aaa()
{
nowtime = new Date();
year = nowtime.getYear();
month = nowtime.getMonth()+1;
date = nowtime.getDate();
hours = nowtime.getHours();
minutes = nowtime.getMinut
Ïà¹ØÎÊ´ð£º
ÓÃjavascript½«Êý¾Ýµ¼³öµ½Îı¾Îļþ(txt)ÖÐ..
Ê×ÏȼÙÉèÒѾÓÐÁËÐèҪдÈëµÄÎı¾ÄÚÈÝ var txtContent ="ÐèҪдÈëµÄÄÚÈÝ";
ÏÖÔÚÐèÒªÓÃjavascript½«ÄÚÈÝдÈëtxtÎļþ(Õâ¸ötxtÎļþ²»´æÔÚ,ÐèÒª´´½¨)ÖÐ,È»ºóдºÃÖ ......
ÎÒÏëÎÊÒ»ÏÂÈçºÎÓÃjavascript¶¯Ì¬ÊµÏÖÏñÎÒÃÇÕâ¸öÍøÕ¾×ó±ßµÄĿ¼£¬Ð»À²£¡
??
ºÇºÇ£¡Ð»Ð»°¡£¡
¶¥Ò»ÏÂ
ÄãÃÇÊÇÊ²Ã´ÍøÕ¾°¡£¬ÒªÊǺǫ́ÊÇjavaÖ±½Ójsp£¬Èç¹ûºǫ́ÊÇc£¬ÄǾÍÓÃcgiÉú³Éxml£¬js¶¯Ì¬È¥¶ÁxmlµÄÊý¾Ý
Ó ......
ÎÒÒ²À´Ò»¸öȤζjavascript:
´ò¿ªÒÔÏÂhtmlÎļþ,ÒÀ´Î°´ÏÂG,L,CÈý¸ö¼ü,¾Í»áÓÐÆæ¼£³öÏÖ!!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" ......
²úÆ·µÄÅäÖÃÒ³Ãæ¹²ÓÃÒ»¸öÓÃJavaScriptµÄdTreeʵÏÖµÄÊ÷Ðνṹ£¬ÏÔʾµÄʱºò£¬Ê÷Ðνṹ¿¿ÔÚÒ³ÃæµÄ×î×ó±ß£¬¸úÎÒµÄÅäÖÃÒ³ÃæÖмä¸ôÁËÒ»´ó¿é£¬ÏÖÔÚÏë°ÑÊ÷ÐÎĿ¼¾ÓÖУ¬½ô¿¿ÔÚÅäÖÃÄÚÈÝÅԱߣ¬ÈçºÎ¿ØÖÆÊ÷ÐÎĿ¼µÄλÖã¬ÒÔ¼°¿É²»¿ ......
Îʸö±È½Ï»ù´¡µÄÎÊÌ⣬ÔÚÒ»¸öhtmlÎļþÖÐÒýÈëÁËÒ»¸ö.jsµÄÎļþ£¬ÄÇô¶ÔÓÚÕâ¸ö .js µÄÎļþÀ´Ëµ£¬ËüËù¶ÔÓ¦µÄµ±Ç°Â·¾¶Ó¦¸ÃÊÇÄÄÒ»¸ö£¿ÊÇhtmlÎļþËùÔڵķ¾¶£¬»¹ÊÇ .js ÎļþµÄ·¾¶£¿£¨htmlÓëjs²»ÔÚͬһÎļþ¼ÐÖУ©
ÓÉÓÚjsÖÐÒ ......