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

JavaScriptµ÷ÊÔ¼¼ÇÉÖ®£º¶Ïµãµ÷ÊÔ


Ê×ÏÈ£¬ÔÚ¸÷¸öä¯ÀÀÆ÷ÖУ¬¶Ïµãµ÷ÊÔÖ§³ÖµÄ×îºÃµÄµ±È»ÊÇFirefox£¬Firefox²»½ö¿ÉÒÔʹÓÃFirebugµ÷ÊÔÒ³Ãæjs½Å±¾£¬»¹¿ÉÒÔÓø߼¶µ÷ÊÔ¹¤¾ßÀýÈçJavaScript Debugger (Venkman) À´µ÷ÊÔFirefoxÀ©Õ¹ÀïµÄjs¡£³ý´ËÖ®Í⣬Firefox»¹Ö§³ÖһЩ¸üΪ¸ß¼¶µÄ¶Ïµãµ÷ÊÔ¡¢±äÁ¿¼àÊÓ¹¦ÄÜ¡£
ÆäËûä¯ÀÀÆ÷ÀOpera¡¢ChromeºÍSafariµÄµ÷ÊÔ¹¦ÄÜÒ²±È½ÏºÃÓá£OperaµÄDragonFlyËÙ¶ÈÏà¶Ô±È½Ï¿ì£¬½çÃæÇåˬ£¬¹¦ÄÜÇ¿´ó£¬µ«²»ÈçSafariµÈÓѺá£Ïà±ÈÀ´Ëµ£¬IE8µÄ³ÌÐòÔ±¹¤¾ß¼òֱû·¨Óá£
Õâ´Îʱ¼äÓÐÏÞ£¬ÏÈÀ´×ܽáÒ»ÏÂFirefoxϵĵ÷ÊÔ¼¼ÇÉ¡£
1. ʹÓÃFirebug½øÐжϵãµ÷ÊÔ
ʹÓÃFirebugµ÷ÊÔJavaScript·Ç³£·½±ã¡£¾ßÌå²½Ö裺
a. ´ò¿ªFirebugºó£¬ÆôÓ᰽ű¾¡±µ÷ÊÔ£¬ÕÒµ½ÒýÓõĽű¾Îļþ£¨»òÕßÐÐÄÚjs£©£»

ÓÃFirebugÕÒµ½Òªµ÷ÊԵĽű¾£¨µã»÷·Å´ó£©
b. ÔÚÊʵ±µÄλÖüÓÈë¶Ïµã£»
c. Èç¹û¶ÏµãÒѾ­Ö´Ðйý£¬ÔòË¢ÐÂÒ³Ãæ£¬Õâʱ½Å±¾¾Í»áÔڶϵ㴦Öжϡ£Èç¹û¶ÏµãûÓÐÖ´Ðйý£¬ÄÇ¿ÉÒÔÖ±½ÓÖ´ÐÐÒ³ÃæÉϵ͝×÷£¨ÀýÈçµã»÷°´Å¥µÈ£©£¬È»ºó´úÂë»áÔڶϵ㴦Öжϣ»

ÓÃFirebug½øÐжϵãµ÷ÊÔ£¨µã»÷·Å´ó£©
d. ¹Û²ìº¯Êýµ÷ÓÃÕ»£¬¹Û²ìlocal±äÁ¿£¬Ò²¿ÉÒÔ½øÐе¥²½Ö´ÐУ¬½øÐе÷ÊÔ¡£
ȷʵ·Ç³£¼òµ¥£¡ÓÃFirebug¶Ïµãµ÷ÊÔµÄÓŵã×ܽáÈçÏ£º
ÄܼӶϵãµÄÐÐÓÃÂÌÉ«Ðкţ¬·Ç³£Ö±¹Û£»
call stackÓÃÁ½ÖÖ·½Ê½ÏÔʾ³öÀ´£¬ºÜ·½±ã£»
±¾µØ±äÁ¿µÄÏÔʾ·Ç³£ÇåÎúÃ÷ÁË¡£
2. ʹÓÃJavaScript Debugger½øÐжϵãµ÷ÊÔ
ÕâÊÇÀÏÅÆµÄµ÷ÊÔ¹¤¾ß£¬Ö®Ç°½Ð×öVenkman£¬¿ÉÒÔÒÔÀ©Õ¹ÐÎʽ°²×°ÔÚFirefoxÉÏ£¬ÎÒÃÇÔÚÕâÀï¾Í³ÆËûΪVenkman°É¡£Ëü²»½öÄܹ»µ÷ÊÔÒ³Ãæ½Å±¾£¬»¹Äܵ÷ÊÔFirefoxÀ©Õ¹£¨extension£©ÀïµÄjs¡£ÎÒÃÇÔÚ×öFirefoxÀ©Õ¹¿ª·¢Ê±£¬VenkmanÊDZز»¿ÉÉٵŤ¾ß£¬ÀÏÌïÇ¿Á¦ÍƼö£¡µ±È»£¬Firefox±¾ÉíµÄÂß¼­ÊµÏÖ£¬Ò²ÊÇÓÃJavaScriptÀ´×öµ½µÄ¡£ÎÒÃÇÏÖÔÚ¿ÉÒÔÓÃVenkmanÀ´µ÷ÊÔÒ»ÏÂFirefox±¾Éí¡£FirefoxµÄºËÐÄjsÊÇbrowser.js£¬ÔÚÕâ¸ö·¾¶Ï£º
chrome://browser/content/browser.js
ÎÒÃÇ´ò¿ªVenkmanÖ®ºó£¬ÔÚLoaded ScriptsÀïÌîÈëbrowser.js£¬Õâ¸öjsÎļþ¾Í»á±»¹ýÂ˳öÀ´£¨Èç¹ûûÓп´µ½browser.js£¬ÄÇôÄã¿ÉÄÜÐèÒª²éÒ»ÏÂÊÇ·ñÑ¡ÉÏÁËDebug->Exclude browser files£©¡£

Venkman£ºÑ¡ÔñÒªµ÷ÊÔµÄjsÎļþ£¨µã»÷·Å´ó£©
ÎÒÃÇÕÒµ½ÈÃä¯ÀÀÆ÷ºóÍ˵ĴúÂ룬Ȼºóµã»÷FirefoxµÄºóÍ˰´Å¥£¬ÕâʱVenkman¾Í»áÍ£ÔÚBrowserBack·½·¨ÉÏ£¡ÈÃÎÒÃÇÔÙÒ»²½Ò»²½µØ¿´Ò»¿´£¬Firefox×Ô¼ºµ½µ××öÁËʲô¡£btw£¬ÊµÏÖFirefoxµÄjs´úÂëÒ²²»ÊÇºÜÆ¯ÁÁÂï~~~

ÓÃJavaScript Debugger¶Ïµãµ÷ÊÔFirefox£¨µã»÷·Å´ó£©
Venkm


Ïà¹ØÎĵµ£º

JavascriptµÄËÄÖּ̳з½Ê½

      ÔÚJavascriptÖУ¬ËùÓпª·¢Õß¶¨ÒåµÄÀà¶¼¿ÉÒÔ×÷Ϊ»ùÀ࣬µ«³öÓÚ°²È«ÐÔ¿¼ÂÇ£¬±¾µØÀàºÍËÞÖ÷À಻ÄÜ×÷Ϊ»ùÀ࣬ÕâÑù¿ÉÒÔ·ÀÖ¹¹«Ó÷ÃÎʱàÒë¹ýµÄä¯ÀÀÆ÷¼¶µÄ´úÂ룬ÒòΪÕâЩ´úÂë¿ÉÒÔ±»ÓÃÓÚ¶ñÒâ¹¥»÷¡£
      Ñ¡¶¨»ùÀàºó£¬¾Í¿ÉÒÔ´´½¨ËüµÄ×ÓÀàÁË¡£ÊÇ·ñʹÓûùÀàÍêÈ«ÓÉÄã¾ö¶¨¡£ÓÐʱ ......

javascriptÈÕÆÚ¶ÔÏó

£±.ÈÕÆÚ¶ÔÏóµÄ¹¹Ôì
1.1µ±Ç°ÈÕÆÚ
          var now = new Date();
    1.2ÌØ¶¨ÈÕÆÚ
var someDate = new Date(yyyy,mm,dd);
    ×¢£ºÔÂÓ¦¸ÃÊÇ´Ó£°¿ªÊ¼¼ÆÊýµÄ.
   2. ÈÕÆÚº¯ÊýµÄʹÓÿÉÒÔ²ÎÕÕÏÂÃæµÄÁ´½Ó. http://www.w3schoo ......

javascript ¶ÁÈ¡£¬ÉèÖÃcookies

function SetCookie(name,value){
var argv=SetCookie.arguments;
var argc=SetCookie.arguments.length;
var expires=(2<argc)?argv[2]:null;
var path=(3<argc)?argv[3]:null;
var domain=(4<argc)?argv[4]:null;
var secure=(5<argc)?argv[5]:false;
document.cookie=name+"="+escape(valu ......

JavaScriptµÄnamespace(Ò»)

ÒýÈëÃüÃû¿Õ¼ä֮ǰ£¬Ò»¸öÁ·¢ÈËԱͷÌÛµÄÎÊÌâ¾ÍÊÇÈçºÎ·ÀÖ¹º¯ÊýÃû/ÀàÃûºÍÆäËûÈ˵ijåÍ»£¬ÔÚÒ»¸ö¹«Ë¾ÄÚ²¿ÏîÄ¿×éÖ®¼ä¿ÉÒÔͨ¹ýÃüÃûÔ¤¶¨£¨±ÈÈç¼Óǰ׺
µÈ£©½â¾öÕâ¸öÎÊÌ⣬µ«ÊǰÑÊÓÏ߷ŵ½Õû¸öÈí¼þ¿ª·¢ÁìÓò£¬ÔÚµ±½ñЭ×÷¿ª·¢Ï൱ʢÐеÄʱ´ú£¬Õâ¸öÎÊÌâÈ´ÒÀÈ»´æÔÚ¡£ÔÚʹÓöà¸öµÚÈý·½¿ò¼Ü»òÀà¿âµÄʱºò£¬ÄãΨһÄÜ×÷
µÄ¾ÍÊÇÆíµ»ËüÃǵÄÃüà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ