¹ØÓÚjavascriptÄ£¿é¼ÓÔصÄ˼Ë÷
×î½üһֱΪ´ËÍ·Í´£¬¹ÃÇÒ°ÑÎÒÄÜÏëµ½µÄ¶«Î÷¶¼Ð´³öÀ´°É¡£ÓÉÓÚ²»ÊǼòµ¥°ÑÒ³ÃæÉÏÊÖдµÄscriptתΪjavascriptÌí¼Ó£¬ÎÒÃÇÐèÒª¿¼ÂǵĶ«Î÷Ö÷ÒªÓÐÁ½¸ö£º¼ÓÔصÄ˳Ðò£¬¼ÓÔØÇ°ºó½Å±¾µÄÔË×÷¡£
ÏÈ˵µÚÒ»¸ö£¬¼ÙÈçÎÒÃÇÒÑÓÐÒ»¼ÓÔØ»úÖÆÁË£¬Òª¼ÓÔØÒ»¸öÐÂÄ£¿é£¬µ±È»ÐÂÄ£¿éÊÇÔÚÁíÒ»¸öJSÎļþÖС£Õâʱ£¬ÎÒÃÇ¿ÉÒÔÃèÊöΪ£º
loader ---> a.js
Õâ¸ö¼ÓÔعý³Ì¿ÉÄÜ»á³öЩÒâÍ⣬Èç·þÎñÆ÷æµµÈÎÊÌ⣬ÔÝʱÎÞ·¨ÎªÎÒÃÇÉú³ÉJSÎļþ£¬ÎÒÃǾÍÐèÒªÔÙ´ÎÇëÇ󣬵«Ò²¿ÉÄÜÓÀÔ¶ÇëÇó²»ÉÏ£¬ÒòΪÄÇÊÇËÀÁ´£¬ºǫ́µÄÈËɵÁËÄÔ´ü£¬¸ÄÁ˵ØÖ·Ò²²»Í¨ÖªÉù£¬ÎÒÃÇÐèÒªÒ»¸ö½ØÖ¹ÆÚÏÞ¡£Õâʱ£¬ÎÒÃÇ¿ÉÒÔÃèÊöΪ£º
loader ---> a.js ---> a.js ---> .....----> timeout
Èç¹ûÄǸöÄ£¿éÒªÒÀÀµÓÚÆäËûÄ£¿éÄØ£¬ÄÇôÎҾͱØÐëÔÚ¼ÓÔØËü֮ǰ¼ÓÔØÆäËûÄ£¿éÁË¡£Õâʱ£¬ÎÒÃÇ¿ÉÒÔÃèÊöΪ£º
loader ---> b.js ---> a.js ---> .....----> timeout
µ«¼Ç¼ÕâЩÒÀÀµ¹ØϵµÄÐÅÏ¢¿Ï¶¨ÔÚa.jsÉÏ£¬¶ø²»ÔÚloaderÉÏ£¬Í¨¹ýa.jsÎÒÃDzÅÄܵÃÖªb.js£¬»»ÑÔÖ®Òª×ñÑ×îÉÙ֪ʶÔÔò£¨Law of Demeter£©¡£
Õâ¸öÎÊÌâµÄ½â¾ö£¬MochiKitÐËÐíÄܸøÎÒÃÇһЩÁé¸Ð°É¡£
ÁíÒ»¸öÎÊÌâÊÇjavascriptÊǵ¥Ï̵߳ģ¬¶ø¼ÓÔØÐèÒªÒ»¸öʱ¼ä£¬²¢ÇÒͨ³£ÊÇÒì²½µÄ¡£µ±ÎÒÃÇÖ´ÐмÓÔغ¯Êýºó£¬¿ÉÄÜJSÒýÇæ»á¼ÌÐøÖ´ÐÐÏÂÃæÐèÒªÐÂÄ£¿éÖ§Ô®µÄ´úÂëƬ¶Ï£¬ÓÉÓÚÕâʱÐÂÄ£¿é»¹Ã»ÓмÓÔØÍê±Ï£¬µ±ÒªÓõ½ÐÂÄ£¿éµÄÊôÐÔ·½·¨¾Í»á±¨´í¡£½â¾ö·½·¨Óжþ£¬Ç¿ÖÆÉÏÃæµÄloader»î¶¯µÄʱ¼äÓë¼ÓÔØʱ¼äÒ»Ñù³¤£¬»»ÑÔÖ®£¬´´ÔìÒ»¸ö×èÈûµÄ»·¾³¡£ÕâÈÝÒ×ʵÏÖ£¬¿É²ÎÕÕdojo¡£²»¹ýÈç¹û¼ÓÔصÄÄ£¿é¹ý¶à£¬ÄÑÃâ»áÔì³Ébody±êÇ©ÄÚһƬ¿Õ°×¡£ÁíÒ»¸ö·½·¨ÊÇʹÓûص÷º¯Êý£¬ÄÇô¾ÍÒªÇóÎÒÃǰѽÓ×ÅÏÂÀ´µÄ´úÂë°Ëж´ó¿é£¬Ã¿¸ö´úÂëƬ¶Ï¶¼ÊÇÏà¶Ô¶ÀÁ¢£¬ËùÓÐÂß¼¶¼ÊÇдÔÚÒ»¸öº¯ÊýÌåÖС£¿´ÉÏÈ¥·Ç³£²»ÓÅÑÅ£¬µ«Ò²±ðÎÞËû·¨£¬ÕâÊÇYUIµÄ×ö·¨¡£
Â»ù±¾ÉϾÍÊÇÕâÑù£¬ÊÇÒ»¸öÊÀ½çÄÑÌâ¡¡²»ÒªÎÊÎÒÒª´úÂ룬ÈÏΪûÓбØÒª¸ãÕâô¸´ÔÓµÄͬ־ÃÇÏÖÔÚ¶¼±»ÆȸÉÕâÊÂÄØ£¬ÊÀÊÂÄÑÁÏ°¡£¡
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
Ò»°ãÎÒ們寫Notes For Web ³Ìʽ時ºÜ長Óõ½URL傳遞һЩ資訊,ÔÚRelease 6 ¶àÖ§Ô®ÁË@UrlQueryStringµÄ¹«Ë¾來Ö±½ÓץȡURL參數,ÕæÊǺÃÓõĹ«Ê½°¢.²»過ʹÓÃ這個當È»還ÊdzÔServerµÄ資Ô´(ЧÄÜ),ÄÜÓà JavaScript ......
<input type="text" onblur="if (value ==''){value='ÇëÊäÈë¹Ø¼ü×Ö'}" onfocus="if (value =='ÇëÊäÈë¹Ø¼ü×Ö'){value =''}" id="q" name="q" value="ÇëÊäÈë¹Ø¼ü×Ö" style="width: 100px; height: 14px;">
......
Struts Validator Framework provides an easy-to-use mechanism for performing client-side validation. It's very useful to validate some fields on the client-side before sending the data to the server for processing. By this way we can ensure that the data send to the server is valid. Performing valida ......