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

javascript¿ª·¢¾­ÑéÖ®——ѹËõ


ÏÖÔÚµÄRIA£¨Rich Internet
applications)Ô½À´Ô½Á÷ÐУ¬JavascriptÔÚÕâÖмäÆðµ½Á˲»¿ÉºöÊÓµÄ×÷Óã¬Õâ¸öÊÀ½çÉÏ£¬ÍêÈ«²»ÓÃJSµÄÍøÕ¾Ó¦¸ÃºÜÉÙÁË£¬Ò»Ð©Óû§ÌåÑéºÃ
µÄÍøÕ¾£¬´ó¶à²ÉÓÃÁËFlash»òÕßJS£¬¶øÒÔJS¾Ó¶à¡£±ÈÈçÏñQunar£¬¾ÍÊÇÒÔJavascript +
AjaxΪÖ÷µÄÍøÕ¾£¬Ç°Ì¨Ò³ÃæÖ÷ÒªÊÇHTML£¬ºǫ́Éú³ÉJSONÊý¾Ý¡£ÔÙ±ÈÈç˵Ajax×îÔç´ó¹æÄ£Ó¦ÓÃÕßGoogle£¬ÎÒÃdz£ÓõÄGMailÒ²
ºÃ£¬Google CalendarÒ²ºÃ£¬Google Docs£¬Google Map£¬¶¼´óÁ¿²ÉÓÃÁËJavascript¡£»¹ÓÐÀýÈçYahooµÈµÈ¡£
Ëæ×Å´ó¹æÄ£µØ²ÉÓÃJavascript£¬ÎÊÌâ¾ÍÀ´ÁË£¬ÎÒÃÇÖªµÀ£¬JSÊÇÒ»ÖÖ½âÎöÐÔÓïÑÔ£¬´úÂ붼ÊÇÃ÷Îĵģ¬ÊÇûÓо­¹ý±àÒëµÄÔ´´úÂ룬ÕâÑù¾ÍÔì³ÉÁËJS
¹ý´óµÄÎÊÌ⣬һ¸öÓû§ÌåÑé·á¸»µÄÒ³Ãæ¼ÓÉÏ¿ò¼Ü£¬»ù±¾ÉÏJS¾Í¿ÉÒÔÇáËɳ¬¹ý200K¡£ÔÚÅ·ÃÀÈÕº«µÈÍøËٱȽϿìµÄµØ·½£¬ÕâµãËã²»ÁËʲô£¬¶øÔÚ¹úÄڵĻ°£¬Èç¹û
JS¾ÍÓÐ200K£¬ÔÙ¼ÓÉÏͼƬ֮ÀàµÄ£¬¹À¼ÆµÃÉÏMÁË¡£ÕâÑùÒ»ÏÂÀ´£¬ÍøËÙ½«»á±äÂý£¬¶øÈç¹ûËٶȱäÂý£¬RIA¾ÍûÓÐʲôÒâÒåÁË£¬RIAµÄ±¾Òâ¾ÍÊÇÌá¸ßÓû§ÌåÑé
ÓëºÏÀíÀûÓÿͻ§¶Ë¶àÓàµÄ×ÊÔ´¡£
Ôõô°ì£¿»¹ºÃ£¬ÎÒÃÇ»¹ÓÐÕУ¬ÕýÒòΪJSÊÇÎı¾£¬ÎÒÃǾͿÉÒÔ²ÉÓÃѹËõµÄ·½Ê½£¬»ù±¾ÉÏÎÒÃÇÓÐÁ½ÖÖ½â¾ö·½°¸£¬µÚÒ»ÖÖÊÇ·þÎñÆ÷¼¶±ðµÄ£¬Ê¹ÓÃGzip¶ÔJS½ø
ÐÐѹËõ£¬ÕâÖÖ·½°¸ÒªÇó¿Í»§ä¯ÀÀÆ÷Ö§³ÖGzip£¬²¢ÇÒÄã¶Ô·þÎñÆ÷ÓÐÆôÓÃGzipµÄȨÏÞ£¬µ±È»£¬Ä¿Ç°ºÜ¶àÐéÄâÖ÷»ú¶¼¿ªÆôÁËGzip£¬ä¯ÀÀÆ÷Ò²ÊÇ99%Ö§³Ö
Gzip¡£Êµ¼ÊÉÏ£¬»¹Óеڶþ·½°¸£¬ÊÇJSÎļþ¼¶µÄ£¬¾ÍÊÇÖ±½Ó¶ÔJS½øÐбàÂë´¦Àí£¬ÊõÓï½Ð»ìÏý£¬µ±È»ÄãÒ²¿ÉÒÔ½ÐѹËõ¡£
JSµÄѹËõÓÐÁ½¸ö²ã´Î£¬µÚÒ»¸ö²ã´ÎÊÇÈ¥µô×¢ÊÍ£¬»»ÐУ¬¿Õ¸ñ£¬ÕâÑùËù¼õСµÄÌå»ý¸ù¾ÝÄãµÄ×¢ÊͶàÉÙÓйأ¬»ù±¾Éϲ»ÄܽÐѹËõ¡£µÚ¶þ¸ö²ã´ÎÒª¸ß¼¶Ò»Ð©£¬ÄǾÍ
ÊÇÀûÓù¤¾ß½«JS½øÐлìÏý£¬»ìÏýÊÇÒ»ÖÖɨÃèÔ´´úÂëµÄ¹ý³Ì£¬Õâ¸ö¹ý³Ì»á°Ñ×ֶκͺ¯Êý±¾À´µÄÃû×ÖÐÞ¸ÄΪ¾­¹ý±àÂëµÄ¡¢ºÁÎÞÒâÒåµÄÃû×Ö£¬ÒÔ´ËÀ´·ÀÖ¹ËûÈËÁ˽âÔ´´úÂë
µÄÄ¿µÄºÍÄÚ²¿½á¹¹¡£ÆäʵÎÒ¸ü¹Ø×¢ËüµÄѹËõ¹¦ÄÜ£¬ÒòΪ»ìÏý»á°Ñº¯ÊýºÍ±äÁ¿µÄÃû³Æ¸Ä³É¶ÌÃû³Æ£¬»¹¿ÉÒÔ½øÐÐbase64±àÂ룬ËùÒÔ»ìÏýºóµÄ´úÂëÒ»°ã¿ÉÒÔÊÇÔ­À´´ú
ÂëµÄ1/3×óÓÒ£¬ÉõÖÁ¸üÉÙ¡£ÎÒÃÇÄôóÃû¶¦¶¦µÄjQuery
1.3.2¾ÙÀý£¬Ã»Óо­¹ýÈκδ¦Àí°üº¬×¢Ê͵ÄÇé¿öÏ£¬jQueryÊÇ122k£¬¾­¹ýÈ¥×¢ÊÍ¿Õ¸ñµÄ´¦ÀíºóÊÇ50¶àk£¬¾­¹ýѹËõºóÊÇ24k£¬¶øÔÙÓÖ¾­¹ý
gzipѹËõÖ®ºó£¬¾Í±ä³É19k£¬´Ó122kµ½19k£¬²î±ð¾ÍÊÇÕâô´ó£¬µ±È»ÆäÖÐÒ»¸ö±È½ÏÖØÒªµÄÔ­Òò£¬ÊÇÒòΪjqueryÖаüº¬´óÁ¿µÄ×¢ÊÍ¡£
˵À´Ñ¹Ëõ£¬ÎÒÃÇÔÚ¿ª·¢ÖÐҪעÒâһЩÎÊÌ⣬ÐÂÊÖÉõÖÁÊÇÓжàÄ꿪·¢µÄÀϺó£¬ÔÚдJSÉÏ£¬Ò²


Ïà¹ØÎĵµ£º

javascriptʼþÇý¶¯¿ò¼Ü ÊÕ²Ø

  javascriptʼþÇý¶¯¿ò¼Ü ÊÕ²Ø
Ò»¸ö¼òµ¥µÄʼþÇý¶¯¿ò¼ÜµÄÑÝʾ£º
/*ControlDemo.js*/
//ʼþÇý¶¯¿ò¼Ü£¨ÑÝʾ£©
function ControlDemo(page)
{
 //³õʼ»¯Page
 if (page == null)
 {
  page = self;
 }
 if (page != self)
 {
  //Do sth. here...
 }
&nb ......

Javascript¼æÈÝIE&FFµÄ¸´ÖƵ½¼ôÌù°å

°ÑÒÔǰдµÄBLOGת¹ýÀ´°É£¬Õâ¸öÊǸö²»´íµÄJS¸´ÖƵ½¼ôÇа壬Áô×÷¼ÇºÅÒÔ±¸ºóÓá£
<mce:script type="text/javascript"><!--
copyToClip(cpStr){
if(clipboardData){
clipboardData.setData("Text", cpStr);}
else if (netscape){
netscape.security.PrivilegeManager.enablePrivilege( ......

ÄÇЩÏà¼ûºÞÍíµÄ JavaScript ¼¼ÇÉ


ÄÇЩÏà¼ûºÞÍíµÄ JavaScript ¼¼ÇÉ
 
ugmbbc·¢²¼ÓÚ 2010-04-24 10:15:58|10771 ´ÎÔĶÁ ×ÖÌ壺´ó Ð¡ ´òÓ¡Ô¤ÀÀ      
¸ÐлÈñÉÌÆóÒµCMSµÄͶµÝ
ÐÂÎÅÀ´Ô´:Smashing Magazine
JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾ­ÊÇËùÓÐ Web Éè¼ÆʦµÄ»ù±¾¹¦£¬ ......

ʵÓÃµÄ JavaScript ²âÊÔ¼°Ð§Ñ鹤¾ß

ÒÔÏÂÄú¿ÉÒÔ¿´µ½ÊÕ¼¯µÄ8¸öʵÓÃµÄ JavaScript ²âÊÔ¼°Ð§Ñ鹤¾ß£¬ËüÃǶ¼¿ÉÒÔÔÚ²»Í¬»·¾³Ï½øÐе¥Ôª²âÊÔ¼°Ð£Ñé²âÊÔÄúµÄ½Å±¾¡£
JSLint
JSLintÊÇ»ùÓÚWebµÄÑéÖ¤JavaScript´íÎó´úÂëµÄ¹¤¾ß¡£ËüÓµÓеŦÄܼ°Ìض¨µÄÉèÖÃÀ´Ê¹ÓÃÄúµÄÐèÇó£¬×Ô¶¨ÒåÄãµÄÑéÖ¤Ëã·¨¡£
JsUnit
JsUnitÊÇÒ»¿îÔÚ¿Í»§¶Ë(ÔÚä¯ÀÀʱ)µÄµ¥Ôª²âÊÔJavaScript¿ò¼Ü¡£¶ÔJa ......

ÄÇЩÏà¼ûºÞÍíµÄ JavaScript ¼¼ÇÉ

JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾ­ÊÇËùÓÐ Web Éè¼ÆʦµÄ»ù±¾¹¦£¬ÕâÃÅÓÐȤµÄÓïÑÔÔ̲Ø×ÅÐí¶à²»ÎªÈËÊìÖªµÄ¶«Î÷£¬¼´Ê¹¶àÄêµÄ JavaScript ³ÌÐòÔ±£¬Ò²Î´ÄÜÍêÈ«³Ô͸¡£±¾ÎÄ´Ó7¸ö·½Ãæ½²Êö JavaScript ÖÐÄÇЩÄã²»ºÜÊìÖªµ«·Ç³£ÊµÓõļ¼ÇÉ¡£
¼òÂÔÓï¾ä
JavaScript ¿ÉÒÔʹÓüòÂÔÓï¾ä¿ìËÙ´´½¨¶ÔÏóºÍÊý× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ