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

Google¿ªÔ´JavaScript¹¤¾ß Closure

Google¿ªÔ´ÁËÆäÄÚ²¿Ê¹ÓõÄJavaScript¿ª·¢¹¤¾ßClosure£¬Ï£Íû°ïÖúÍⲿ³ÌÐòÔ±¿ª·¢³öËٶȸü¿ìµÄWebÓ¦ÓóÌÐò¡£GoogleÈÏΪͨ¹ýÔÊÐí¿ª·¢ÕßʹÓÃGoogle×Ô¼ºËùÓõŤ¾ß£¬ËûÃDz»½ö¿ÉÒÔ´´Ôì³ö¸ü¿ìµÄ¸»WebÓ¦ÓóÌÐò£¬¶øÇÒÄÜÕæÕýÈÃWeb²åÉϳá°ò¡£Closure JavaScript±àÒëÆ÷ºÍ¿âÔø±»GoogleÓÃÓÚ¿ª·¢Gmail¡¢Google Docs¡¢Google MapsÒÔ¼°ÆäËüÓ¦ÓóÌÐò¡£
Closure¹¤¾ß°üÀ¨ÁËJavaScriptÓÅ»¯Æ÷£¬ÒƳý²»ÐèÒªµÄ´úÂ룬ѹËõÆäÓàµÄ´úÂëÒÔʵÏÖËÙ¶È×î´ó»¯£»
ÓëFirebugЭͬ¹¤×÷µÄFirefoxÀ©Õ¹Closure Inspector£¬Ä¿µÄÊǼò»¯µ÷ÊÔ£»
Closure±àÒëÆ÷£¬ÄÜÒÔÃüÁîÐС¢WebÓ¦ÓûòFirefoxÀ©Õ¹ÐÎʽÔËÐУ»
Closure Library£¬GoogleµÄ±ê×¼JavaScriptÀà¿â£»
Closure TemplatesÌṩÁËÒ»×éÔ¤±àÒëµÄJavaScript½Ó¿Ú×é¼þ¡£


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

JavaScriptÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(2): Êý×é

 ±¾²©¿ÍתÔØÓÚ£ºhttp://devbean.javaeye.com/blog/404040
»òÐíÄã»áÆæ¹Ö£¬ÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆΪʲô´ÓÊý×鿪ʼ½²Æð£¿ÕâÊÇÒòΪ……Æä¼äµÄÖÖÖÖ¹Øϵ°É……ºÙºÙ£¬ÕâÀïÏÈÂô¸ö¹Ø×Ó£¬ÏÈÀ´¿´¿´ÎÒÃÇÊìϤµÄÊý×éÔÚJavaScriptÀïÃæÊÇʲôÑù×ӵġ£
 
1. ´´½¨Êý×é
 
ÔÚJavaScriptÖÐÓкܶഴ½¨Ê ......

JavaScriptÓï·¨¼¯½õ£¨Èý£©

 String¶ÔÏóµÄ charAt(x)¶ÔÏó ·´»ØÖ¸¶¨¶ÔÏóµÄµÚ¶àÉÙλµÄ×Öĸ
                     lastIndexOf("string") ´ÓÓÒµ½×óѯÕÒÖ¸¶¨×Ö·û£¬Ã»Óзµ»Ø-1
           ......

Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â

 ÐÂÎÅÀ´Ô´:tripwiremagazine.com
JavaScript ÊÇ Web ¿ª·¢ÓëÉè¼ÆÖв»¿É»òȱµÄ¶«Î÷£¬²»¹ÜÊÇÒ»¸ö¼òµ¥µÄÍøÒ³»¹ÊÇÒ»¸öרҵµÄÕ¾µã£¬Ò²²»¹ÜÄãÊǸßÊÖ»¹ÊDzËÄñ£¬Èç½ñ
JavaScript ¿âÔ½À´Ô½Ç¿´ó£¬¿ÉÒÔʤÈÎÐí¶à¸´ÔӵŤ×÷£¬È»¶øͬʱ£¬ÈËÃÇÔÚÖÚ¶à JavaScript ¿âÃæÇ°ÓÖ¾õµÃÎÞËùÊÊ´Ó£¬±¾ÎÄ£¬ÎÒÃǽ«Ê¹ÓÃ
Google ËÑË÷³öÅÅÃûÇ° 10 λµ ......

ÈçºÎͨ¹ýJavaScriptº¯Êý»ñÈ¡Web±¨±íµ¥Ôª¸ñµÄÖµ

±¨±íÕ¹ÏÖÔÚwebÒ³ÃæÒÔºó£¬ÓÐʱÐèÒª»ñȡijµ¥Ôª¸ñµÄÖµ¡£ÈóǬ±¨±íÖпÉÒÔͨ¹ýÔÚjspÒ³ÃæÖÐÉ趨JavaScriptº¯ÊýÀ´ÊµÏÖÕâ¸ö¹¦ÄÜ¡£ÏÂÃæ¾Íͨ¹ýÒ»¸öÏÂÀý×Ó¼òµ¥½éÉÜÒ»ÏÂÈçºÎͨ¹ýJavaScriptº¯Êý»ñÈ¡Web±¨±íµ¥Ôª¸ñµÄÖµ¡£
Ê×ÏÈ£¬½«·¢²¼±¨±íµÄjspÒ³ÃæÖеı¨±í±êÇ©<report:html>·ÅÔÚÒ»¸ö<table>±êÇ©ÖУ¬ÈçÏÂͼ
ÆäÖÐ<report:h ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ