JavaScript ʱÖÓ£¨´úÂ룩
JavaScript ʱÖÓ£¨´úÂ룩:
<html>
<body onload=aaa()>
<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();
if (seconds <10)
{
seconds = "0"+seconds;
}
if (minutes <10)
{
minutes = "0"+minutes;
}
all = year + " "+month +" "+ date +" "+ hours +":"+minutes+":"+seconds;
time.innerHTML
= all;
window.setTimeout("aaa();",100);
}
</script>
<div id="time"
></div>
</body>
</html>
Ïà¹ØÎĵµ£º
1. document ʵ¼ÊÉÏÊÇ window ¶ÔÏóµÄÊôÐÔ.ÓÃÓÚ·ÃÎÊÎĵµµÄÐÅÏ¢.
alert(window.document == document); //outputs "true"
2. location ¶ÔÏóÊÇ window ¶ÔÏóºÍ document ¶ÔÏóµÄÊôÐÔ,ËùÒÔÏÂÃæÁ½¸öÒýÓû¥ÏàµÈ¼Û.ÓÃÓÚ·ÃÎÊURLµÄÐÅÏ¢.
window.location;
document.location;
3. n ......
ÔÚÏßÊÔÍ棺http://asfoxes.w229.7ga.net/js
ÏÂÔصØÖ·£ºhttp://download.csdn.net/source/2235386
֮ǰ»¨ÁËÒ»¸ö½üÒ»¸öÀñ°ÝдµÄ
Ä¿Ç°»ù±¾Íê³ÉÁË£¬¿ÉÒÔÈ¥³¢ÊÔÏÂ
ä¯ÀÀÆ÷°æ±¾£º
IE8Õý³£ÔËÐÐ
op¡¢ff...ÉÐÓÐÒ»¸öСbug£¬²»ÄÜÍêÃÀÔËÐÐ
Ö÷ÒªÓÐÒÔϼ¸¸öÎÊÌâÔÝʱû´¦Àí£º
1.¸ü¼Ó¶àµÄÖ²ÎïºÍ½©Ê¬ÖÖÀàÌí¼Ó
2.Ö²ÎïºÍ½©Ê¬µÄÌùͼ»¹ ......
ÕýÔò±í´ïʽÊÇÒ»¸ö·Ç³£·Ç³£·Ç³£Ç¿´óµÄÓïÑÔ£¬ÕâÀïÁ¬ÐøÓÃÁËÈý¸ö·Ç³££¬ÎÒ¾õµÃ»¹²»¹»£¬Ëü½¿Ð¡µ«È´¹¦
ÄÜÇ¿´ó£¬¾ø¶ÔµÄŨËõµÄ¾ÍÊǾ«»ª£¬ÎÒ·¢ÏÖÎÒÔ½À´Ô½Ï²»¶ËüÁË¡£
Õâ¶Îʱ¼ä×öÈÕÆڵĴ¦Àí£¬ÐèÒªÓõ½ÈÕÆڵļÆË㣬°üÀ¨¼Ó¼õʲôµÄ£¬ÓÚÊÇ×öÁËÒ»¸ö¹«Óô¦ÀíµÄÀ©Õ¹£¬½Ð
String.prototype.dateExpression¡£ÒòΪÈÕÆÚ´¦Àí¶¼»áÓõ½±í´ïʽ£¬À ......
»º´æϵͳÎÒÒÔÇ°ÔÚ²©¿Íд¹ýÁË£¬´ËºóÎÒ¶ÔjavascriptµÄÕÜѧ·¢ÉúºÜ´óµÄ¸Ä±ä¡£ÒÔÇ°ÊǾ¡Á¿±ÜÃâ¶ÔÔÐͽøÐÐÀ©Õ¹µÄ£¬µ«·´¹ýÀ´Ò»Ï룬ÓÐʲô¹Øϵ£¿³ý·ÇÊÇɵ×Ó»òÌرð²ËµÄÈ˲Żá»ìÓöà¸ö¿â£¬ÄÜ»ìÓÿâµÄÈËÒ²Ö»ÓиßÊÖ²ÅÄܱÜÃâÃüÃû³åÍ»µÄÞÏÞΡ£Ê®´óÀà¿âÖУ¬Ç°Ã漸¸ö¶¼ÊǶÔÔÐͽøÐзè¿ñÀ©Õ¹µÄ¡£Ïñmootools£¬´úÂë²»¶à£¬µ«ÄÜʵÔÚ±ÈjQuery¶àÐí¶à ......
<html>
<body>
<mce:script language=javascript><!--
todayDate = new Date();
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
document.write("½ñÌìÊÇ")
document.write("<br>")
if(navigator.appName == "Netscape")
{
document.w ......