Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javascriptÏÔʾʱ¼ä


 //ÏÔʾµ±Ç°Ê±¼ä----------------------------------------------------------
<SCRIPT language="javascript" type="text/javascript" >
function reloop(){
 var time = new Date( ); //»ñµÃµ±Ç°Ê±¼ä
 //»ñµÃÄê¡¢Ô¡¢ÈÕ£¬Date()º¯ÊýÖеÄÔ·ÝÊÇ´Ó0£­11¼ÆËã
 var year = time.getFullYear(); 
 var month = time.getMonth()+1;
 var date = time.getDate();
 //»ñµÃСʱ¡¢·ÖÖÓ¡¢Ãë
 var hour = time.getHours(); 
 var minute = time.getMinutes();
 var second = time.getSeconds();
 //»ñµÃÒ»¸öÐÇÆÚÖеĵڼ¸Ìì,Î÷·½µÄÐÇÆÚÊÇ´ÓÐÇÆÚÈÕ¿ªÊ¼£¬ÐÇÆÚÁù½áÊø
 var day = time.getDay();
 if (minute < 10) //Èç¹û·ÖÖÓÖ»ÓÐ1룬²¹0ÏÔʾ
   minute="0"+minute;
 if (second < 10) //Èç¹ûÃëÊýÖ»ÓÐ1룬²¹0ÏÔʾ
   second="0"+second;
 
 var weekDesc = new Array("ÐÇÆÚÌì","ÐÇÆÚÒ»","ÐÇÆÚ¶þ","ÐÇÆÚÈý","ÐÇÆÚËÄ","ÐÇÆÚÎå","ÐÇÆÚÁù");
 for(var i=0;i<weekDesc.length;i++){
  if(day==i){
  document.getElementById("t").value="½ñÌìÊÇ:"+year+"Äê"+month+"ÔÂ"+date+"ÈÕ"+weekDesc[i]+"  "+hour+":"+minute+":"+second;
  setTimeout("reloop()",1000);
  }
 }
}


Ïà¹ØÎĵµ£º

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

javascriptÍøÒ³¶Ô»°¿ò²ÎÊýÏê½â

N.1 »ù±¾½éÉÜ£º
    * showModalDialog() (IE 4+ Ö§³Ö)£¬ÓÃÀ´´´½¨Ò»¸öÏÔʾHTMLÄÚÈݵÄģ̬¶Ô»°¿ò¡£
    * showModelessDialog() (IE 5+ Ö§³Ö) £¬ÓÃÀ´´´½¨Ò»¸öÏÔʾHTMLÄÚÈݵķÇģ̬¶Ô»°¿ò¡£
N.2 ʹÓ÷½·¨£º
    * vReturnValue = window.showModalDialog(sURL [, vArgument ......

javascript ÔÚ ie ºÍ firefox Çø±ð

1.document.formName.item("itemName") ÎÊÌâ
˵Ã÷:IEÏÂ,¿ÉÒÔʹÓÃdocument.formName.item("itemName")»òdocument.formName.elements["elementName"];FirefoxÏÂ,Ö»ÄÜʹÓÃdocument.formName.elements["elementName"].
½â¾ö·½·¨:ͳһʹÓÃdocument.formName.elements["elementName"].
JQUERY:
$("#idName")
  &nb ......

JavaScriptÖÐÄÚÖöÔÏó

JavaScriptÖÐÌṩÁËһЩ·Ç³£ÓÐÓõÄÄÚ²¿¶ÔÏó×÷Ϊ¸ÃÓïÑԹ淶µÄÒ»²¿·Ö£¬Ã¿Ò»¸öÄÚ²¿¶ÔÏó¶¼ÓÐһЩ·½·¨ºÍÊôÐÔ¡£
JavaScriptÖÐÌṩµÄÄÚ²¿¶ÔÏó°´Ê¹Ó÷½Ê½¿ÉÒÔ·ÖΪ¶¯Ì¬¶ÔÏóºÍ¾²Ì¬¶ÔÏó¡£
¶¯Ì¬¶ÔÏó£ºÔÚÒýÓÃËûµÄÊôÐԺͷ½·¨ÊÇ£¬±ØÐëʹÓÃnew¹Ø¼ü×Ö´´½¨Ò»¸ö¶ÔÏóʵÀý£¬È»ºó²Å¿ÉÒÔʹÓÓ¶ÔÏóʵÀýÃû.³ÉÔ±”µÄ¸ñʽÀ´·ÃÎÊÆäÊôÐԺͷ½ ......

£¨×ª£©javascript ÄÚ´æй¶¹¤¾ßʹÓÃ


javascriptÄÚ´æ鶵ÄÎÊÌâÒ»Ö±ÒÔÀ´¶¼²»Êܵ½´ó¼ÒµÄÖØÊÓ£¬Ô­ÒòÊǶÔÓû§µÄÓ°ÏìûÓÐ̫ʵ¼ÊµÄ±íÏÖ£¬»òÐí½ü¼¸ÄêÄڴ淢չѸËÙ¡£½Å±¾ÄÚ´æÔÙй¶Ҳ²»»áÓÐÌ«´óÓ°Ïì¡£
µ±È»×÷Ϊǰ¶Ë¿ª·¢µÄͬѧÃÇ£¬¾Í²»ÄÜÓÐÕâÑùµÄ½ÄÐÒÐÄÀí¡£³öÏÖmemory leaksºÜ´ó³Ì¶ÈÉÏÊÇÒòΪ³ÌÐòµÄ²»³ÉÊìºÍ±àÂ벻̫¹æ·¶Ôì³ÉµÄ¡£²»¹ý£¬ÕâÀï¾Í²»ËµÈçºÎ³öÏÖÎÊÌâµÄ£¬¶ÔÎÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ