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

JavaScript ´´½¨Àà/¶ÔÏóµÄ¼¸ÖÖ·½Ê½

ÔÚJSÖУ¬´´½¨¶ÔÏó£¨Create Object£©²¢²»ÍêÈ«ÊÇÎÒÃÇʱ³£ËµµÄ´´½¨Àà¶ÔÏó£¬JSÖеĶÔÏóÇ¿µ÷µÄÊÇÒ»ÖÖ¸´ºÏÀàÐÍ£¬JSÖд´½¨¶ÔÏó¼°¶Ô¶ÔÏóµÄ·ÃÎÊÊǼ«ÆäÁé»îµÄ¡£
JS¶ÔÏóÊÇÒ»ÖÖ¸´ºÏÀàÐÍ£¬ËüÔÊÐíÄãͨ¹ý±äÁ¿Ãû´æ´¢ºÍ·ÃÎÊ£¬»»Ò»ÖÖ˼·£¬¶ÔÏóÊÇÒ»¸öÎÞÐòµÄÊôÐÔ¼¯ºÏ£¬¼¯ºÏÖеÄÿһÏÓÉÃû³ÆºÍÖµ×é³É£¨ÌýÆðÀ´ÊDz»ÊǺÜÏñÎÒÃdz£Ìý˵µÄHASH±í¡¢×ֵ䡢½¡/Öµ¶Ô£¿£©£¬¶øÆäÖеÄÖµÀàÐÍ¿ÉÄÜÊÇÄÚÖÃÀàÐÍ(Èçnumber,string)£¬Ò²¿ÉÄÜÊǶÔÏó¡£
Ò»¡¢ÓÉÒ»¶Ô´óÀ¨ºÅÀ¨ÆðÀ´
    var emptyObj = {};
    var myObj =
    {
        'id': 1,        //ÊôÐÔÃûÓÃÒýºÅÀ¨ÆðÀ´£¬ÊôÐÔ¼äÓɶººÅ¸ô¿ª
        'name': 'myName'
    };
    //var m = new myObj(); //²»Ö§³Ö
 
¡¡¡¡²»ÖªÄã×¢Òâµ½¶ÔÏó¶¼ÊÇÓà var ÉùÃ÷µÄûÓУ¬ÏñÉÏÃæµÄ´úÂ룬¾ÍÖ»ÊǼòµ¥µÄÉùÃ÷Ò»¸ö¶ÔÏó£¬ËüÖ»ÓÐÒ»·Ý¿½±´£¬Äã²»ÄÜÏñʵÀý»¯Àà¶ÔÏóÒ»Ñù¶ÔËü²ÉÓÃnew²Ù×÷£¬ÏñÉÏÃæ´úÂëµÄ×¢ÊͲ¿·Ö¡£ÕâÑù¾Í¼«´óµÄÏÞÖÆÁ˶ÔÏóµÄÖØÓ㬳ý·ÇÄ㽨Á¢µÄ¶ÔÏóÖ»ÐèÒªÒ»·Ý¿½±´£¬·ñÔò¿¼ÂÇÓÃÆäËû·½·¨½¨Á¢¶ÔÏó¡£
¡¡¡¡ÏÂÃæÒ»Æð¿´¿´ÈçºÎ·ÃÎʶÔÏóµÄÊôÐԺͷ½·¨¡£
    var myObj =
    {
        'id': 1,
        'fun': function() {
            document.writeln(this.id + '-' + this.name);//ÒÔ"¶ÔÏó.ÊôÐÔ"·½Ê½·ÃÎÊ
        },
        'name': 'myObj',
        'fun1': function() {
            document.writeln(this['id'] + '+' + this['name']);//ÒÔ¼¯ºÏ·½Ê½·ÃÎÊ
        }
    };
 &


Ïà¹ØÎĵµ£º

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

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

JavaScriptÖÐµÄ escape,encodeURI,encodeURIComponent


js¶ÔÎÄ×Ö½øÐбàÂëÉæ¼°3¸öº¯Êý£ºescape,encodeURI,encodeURIComponent£¬ÏàÓ¦3¸ö½âÂ뺯Êý£ºunescape,decodeURI,decodeURIComponent
1¡¢   ´«µÝ²ÎÊýʱÐèҪʹÓÃencodeURIComponent£¬ÕâÑù×éºÏµÄurl²Å²»»á±»#µÈÌØÊâ×Ö·û½Ø¶Ï¡£               ......

ÉîÈëÀí½âJavaScript±Õ°ü£¨closure£©

×î½üÔÚÍøÉϲéÔÄÁ˲»ÉÙJavascript±Õ°ü(closure)Ïà¹ØµÄ×ÊÁÏ£¬Ð´µÄ´ó¶àÊǷdz£µÄѧÊõºÍרҵ¡£¶ÔÓÚ³õѧÕßÀ´Ëµ±ð˵Àí½â±Õ°üÁË£¬¾ÍÁ¬ÎÄ×ÖÐðÊö¶¼ºÜÄÑ¿´¶®¡£×«Ð´´ËÎĵÄÄ¿µÄ¾ÍÊÇÓÃ×îͨË×µÄÎÄ×Ö½Ò¿ªJavascript±Õ°üµÄÕæʵÃæÄ¿¡£
Ò»¡¢Ê²Ã´ÊDZհü£¿
“¹Ù·½”µÄ½âÊÍÊÇ£ºËùν“±Õ°ü”£¬Ö¸µÄÊÇÒ»¸öÓµÓÐÐí¶à±äÁ¿ºÍ°ó¶¨Á ......

JavaScriptµ÷Óñ¾µØEXEÎļþÓë²é¿´×¢²á±í´úÂë

<!--JavaScript µ÷Óÿͻ§¶ËÓ¦ÓóÌÐò-->
<script type="text/javascript">  
    function exec(command) 
    {  
          window.oldOnError   =   window.onerror;  ......

javascriptÖÐevent.keycode

javascriptÖÐevent.keycode
 keycode 8 = BackSpace BackSpace
keycode 9 = Tab Tab
keycode 12 = Clear
keycode 13 = Enter
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 27 = Escape Escape
keycode 32 = space space ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ