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

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

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

jQuery ÊÇÒ»¸öºÜÐ嵀 JavaScript ¿â£¬ËüµÄ¿ÚºÅÊÇ“¼¸ÐдúÂ룬ÄܸɴóÊ”£¨Write Less, Do More£©£¬ËüÊÇÓµÓÐ×î¶à²å¼þºÍÀ©Õ¹µÄ JavaScript ¿â£¬ÒÔÏÂÊÇ jQuery ÏÖ×´£º
µ±Ç°°æ±¾£º 1.3.2
Îļþ³ß´ç£ºÑ¹Ëõºó×îС19KB£¬Î´Ñ¹ËõΪ120K¡£
×÷Õߣº John Resig
ÓµÓÐ19ÖÖÓïÑԵĽ̳Ì
: ½Ì³Ì×ܼÆ183ÖÖ¡£
ÖøÃûÓû§£º
³¬¹ý1000¸ö
²å¼þ
: 3493
Ò×ѧ
¶ÔÉè¼ÆʦÀ´Ëµ·Ç³£Ò×ѧ£¬Ê¹Óà CSS Óï·¨
ÓµÓдóÁ¿ÓÐȤµÄÀ©Õ¹
ÓµÓзdz£³öÉ«µÄÉçÇø£¬¿ÉÄÜÊÇ×î´óµÄ
±»ÊýÒÔ°ÙÍòµÄÕ¾µãʹÓ㬰üÀ¨ÖîÈç Google, Dell, CBS, NBC, DIGG, Bank of America, Wordpress, Drupal, Mozilla µÈÖøÃûÕ¾µã¡£
2. MooTools – a compact javascript framework


MooTools ÊÇÒ»¸öʹÓà MIT Ðí¿ÉµÄ¿ªÔ´ÏîÄ¿£¬Òâζ×ÅÄã¿ÉÒÔÔÚÈÎÒ»³¡ºÏʹÓûò¶ÔËü¾ÍÐÐÐ޸ġ£
µ±Ç°°æ±¾: 1.2.3
δѹËõ³ß´ç: 95 KB
(¿Í»§¶Ë) £¬22 KB
(·þÎñÆ÷¶Ë)
×÷Õß: Valerio Proietti
ÖøÃûÓû§: w3c
, cnet
, bing
, …
¹Ù·½Õ¾ÉϵIJå¼þÊýÄ¿: 4
ÓµÓиüºÃµÄÃæÏò¶ÔÏó½á¹¹
ËüµÄ¶¯»­Ð§¹û¸üƽ»¬
Óï·¨¼°¶ÔÏó¾ä±ú¸ü¸»Âß¼­
3. Prototype
: Easy Ajax and DOM manipulation for dynamic web applications
±»Ò»Ð©´óÐÍýÌ幫˾ºÍ×é֯ʹÓã¬Protorype
ÊÇÒ»¸öºÜ¶ÀÌØµÄ JavaScript ¿â£¬Öð½¥³ÉΪ Web ÒýÓÿª·¢ÕߵĴúÂë»ù´¡£¬Ëæ×Å×îÐ嵀 1.6.1 °æ±¾µÄÍƳö£¬Protorype
ÔÚÐÔÄÜ£¬Óû§×Ô¶¨ÒåʼþÒÔ¼°Í¬ÏÖ´úä¯ÀÀÆ÷¼æÈÝ·½ÃæÔ½À´Ô½ÍêÉÆ¡£
×îа汾: 1.6.1
δѹËõ³ß´ç: 136 KB
(´óÔ¼5000ÐдúÂë)
×÷Õß: Sam Stephenson
ÖøÃûÓû§
: NASA, CNN, NBC, …
²å¼þÊýÄ¿: 150+
¸üÊÊÓÃÓÚ´óÐÍ Web ³ÌÐò
4. Dojo Toolkit
: great experiences for everyone
Dojo µÄÄÚºËСÇÉ£¬¿ì£¬¾«É¿ÉÓÃÀ´´´½¨·´Ó¦ÁéÃôµÄ Web ³ÌÐò£¬ÓµÓкܳöÉ«µÄ UI ¹¤¾ß£¬ÔÚ¿É·ÃÎÊÐÔ£¬±¾µØ»¯·½ÃæÒ²×öµÃºÜºÃ¡£
×îа汾: 1.4 Beta
δѹËõ³ß´ç: 26 KB
(Ô¼5000ÐдúÂë)
¿ª·¢×éÖ¯: Dojo Foundation
ÖøÃ


Ïà¹ØÎĵµ£º

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

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

JavaScript eval() º¯Êý

 JavaScript eval() º¯Êý
¶¨ÒåºÍÓ÷¨
eval() º¯Êý¿É¼ÆËãij¸ö×Ö·û´®£¬²¢Ö´ÐÐÆäÖÐµÄµÄ JavaScript ´úÂë¡£
Óï·¨
eval(string)
²ÎÊýÃèÊö
string
±ØÐè¡£Òª¼ÆËãµÄ×Ö·û´®£¬ÆäÖк¬ÓÐÒª¼ÆËãµÄ JavaScript ±í´ïʽ»òÒªÖ´ÐеÄÓï¾ä¡£
·µ»ØÖµ
ͨ¹ý¼ÆËã string µÃµ½µÄÖµ£¨Èç¹ûÓеĻ°£©¡£
˵Ã÷
¸Ã·½·¨Ö»½ÓÊÜԭʼ×Ö·û´®×÷Ϊ² ......

javascriptС¼¼ÇÉ

javascriptС¼¼ÇÉ
ʼþÔ´¶ÔÏó
event.srcElement.tagName
event.srcElement.type
²¶»ñÊÍ·Å
event.srcElement.setCapture(); 
event.srcElement.releaseCapture(); 
ʼþ°´¼ü
event.keyCode
event.shiftKey
event.altKey
event.ctrlKey
ʼþ·µ»ØÖµ
event.returnValue
Êó±êλÖÃ
event ......

JavaScriptÓï·¨¼¯½õ£¨¶þ£©

function function xx(){...} ¶¨Ò庯Êý
isNumeric                   ÅжÏÊÇ·ñÊÇÊý×Ö
innerHTML xx=¶ÔÏó.innerHTML ÊäÈëij¶ÔÏó±êÇ©ÖеÄhtmlÔ´´úÂë
innerText divid.innerText=xx ½«ÒÔdiv¶¨Î»ÒÔidÃüÃûµÄ¶ÔÏóÖµÉèΪXX
locati ......

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

 String¶ÔÏóµÄ charAt(x)¶ÔÏó ·´»ØÖ¸¶¨¶ÔÏóµÄµÚ¶àÉÙλµÄ×Öĸ
                     lastIndexOf("string") ´ÓÓÒµ½×óѯÕÒÖ¸¶¨×Ö·û£¬Ã»Óзµ»Ø-1
           ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ