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

JavaScript¶ÔÏóϵͳµÄʹÓà [6]

ʹÓÃä¯ÀÀÆ÷µÄÄÚ²¿¶ÔÏóϵͳ,
¿ÉʵÏÖÓëHTMLÎĵµ½øÐн»»¥¡£ËüµÄ×÷ÓÃÊǽ«Ïà¹ØÔªËØ×éÖ¯°ü×°ÆðÀ´£¬Ìṩ¸ø³ÌÐòÉè¼ÆÈËԱʹÓ㬴Ӷø¼õÇá±à³ÌÈ˵ÄÀͶ¯£¬Ìá¸ßÉè¼ÆWebÒ³ÃæµÄÄÜÁ¦¡£
Ò»¡¢
ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷ÓÃ
¡¡¡¡³ýÁËÇ°ÃæÌáµ½¹ýµÄÎĵµdocument¶ÔÏóÍ⣬Navigatorä¯ÀÀÆ÷Öл¹ÌṩÁË´°¿Ú£¨Window£©¶ÔÏóÒÔ¼°ÀúÊ·£¨History£©ºÍλÖÃ
£¨Location£©¶ÔÏó¡£
¡¡¡¡ä¯ÀÀÆ÷¶ÔÏó(Navigator)
¡¡¡¡¡¡¡¡ÌṩÓйØä¯ÀÀÆ÷µÄÐÅÏ¢
¡¡¡¡´°¿Ú¶ÔÏó(Windows)
¡¡¡¡¡¡¡¡Window¶ÔÏó´¦ÓÚ¶ÔÏó²ã´ÎµÄ×¶Ë£¬ËüÌṩÁË´¦ÀíNavigator´°¿ÚµÄ·½·¨ºÍÊôÐÔ¡£
¡¡¡¡Î»ÖöÔÏó(Location)
¡¡¡¡¡¡¡¡Location¶ÔÏóÌṩÁËÓ뵱ǰ´ò¿ªµÄURLÒ»Æð¹¤×÷µÄ·½·¨ºÍÊôÐÔ£¬ËüÊÇÒ»¸ö¾²Ì¬µÄ¶ÔÏó¡£
¡¡¡¡ÀúÊ·¶ÔÏó(History)
¡¡¡¡¡¡¡¡History¶ÔÏóÌṩÁËÓëÀúÊ·Çåµ¥ÓйصÄÐÅÏ¢¡£
¡¡¡¡Îĵµ¶ÔÏó(Document)
¡¡¡¡¡¡¡¡document¶ÔÏó°üº¬ÁËÓëÎĵµÔªËØ(elements)Ò»Æð¹¤×÷µÄ¶ÔÏó£¬Ëü½«ÕâЩԪËØ·â×°ÆðÀ´¹©±à³ÌÈËԱʹÓá£
¡¡¡¡±à³ÌÈËÔ±ÀûÓÃÕâЩ¶ÔÏ󣬿ÉÒÔ¶ÔWWWä¯ÀÀÆ÷»·¾³ÖеÄʼþ½øÐпØÖƲ¢×÷³ö´¦Àí¡£ÔÚJavaScriptÖÐÌṩÁ˷dz£·á¸»µÄÄÚ²¿·½·¨ºÍÊôÐÔ,´Ó¶ø¼õÇáÁ˱à
³ÌÈËÔ±µÄ¹¤×÷,Ìá¸ß±à³ÌЧÂÊ¡£ÕâÕýÊÇ»ùÓÚ¶ÔÏóÓëÃæÏò¶ÔÏóµÄ¸ù±¾Çø±ðËùÔÚ¡£ÔÚÕâЩ¶ÔÏóϵͳÖÐ,Îĵµ¶ÔÏóÊôÓڷdz£ÖØÒªµÄ,ËüλÓÚ×îµÍ²ã,µ«¶ÔÓÚÎÒÃÇʵÏÖWeb
Ò³ÃæÐÅÏ¢½»»¥Æð×÷¹Ø¼ü×÷Óá£Òò¶øËüÊǶÔÏóϵͳµÄºËÐIJ¿·Ö¡£
¡¡
¶þ¡¢Îĵµ¶ÔÏó¹¦Äܼ°Æä×÷ÓÃ
¡¡¡¡ÔÚNavigatorä¯
ÀÀÆ÷ÖУ¬documentÎĵµ¶ÔÏóÊǺËÐÄÊÇ£¬Í¬Ê±Ò²ÊÇ×îÖØÒªµÄ¡£¼û±í6-1Ëùʾ¡£
Links
Anchor
Form
Method
Prop
Á´½Ó¶ÔÏó
ê¶ÔÏó
´°Ìå¶ÔÏó
·½·¨
¶ÔÏó
±í6£­1 document¶ÔÏó
¡¡
¡¡´Ó±í6-1ÖпÉÒÔ¿´³ö£¬document¶ÔÏóµÄÖ÷Òª×÷ÓþÍÊÇ°ÑÕâЩ»ù±¾µÄÔªËØ£¨Èçlinks,anchorµÈ£©°ü×°ÆðÀ´£¬Ìṩ¸ø±à³ÌÈËԱʹÓᣴÓÁíÒ»¸ö
½Ç¶È¿´£¬document¶ÔÏóÖÐÓÖÊÇÓÉÊôÐԺͷ½·¨×é³É¡£
¡¡
£±¡¢documentÖÐÈý¸öÖ÷Òª
µÄ¶ÔÏó
ÔÚdocumentÖÐÖ÷ÒªÓУºlinks,anchor,formµÈÈý¸ö×îÖØÒªµÄ¶ÔÏó£º
£¨£±£©anchorê¶ÔÏó£º
anchor
¶ÔÏóÖ¸µÄÊÇ<A Name=...>
</A>±êʶÔÚHTMLÔ´ÂëÖдæÔÚʱ²úÉúµÄ¶ÔÏó¡£Ëü°üº¬×ÅÎĵµÖÐËùÓеÄanchorsÐÅÏ¢¡£
£¨£²£©Á´½Ólinks¶ÔÏó
¡¡¡¡
link¶ÔÏóÖ¸µÄÊÇÓÃ<A Href=...> </A>±ê¼ÇµÄÁ¬½ÓÒ»¸ö³¬Îı¾»ò³¬Ã½ÌåµÄÔªËØ×÷Ϊһ¸öÌض¨µÄURL¡£
£¨£³£©
´°Ì壨Form£©¶ÔÏó
¡¡¡¡´°Ìå¶ÔÏóÊÇÎĵµ¶ÔÏóµÄÒ»¸öÔªËØ£¬Ëüº¬ÓжàÖÖ¸ñʽµÄ¶ÔÏó´¢´æÐÅÏ¢£¬Ê¹ÓÃËü¿ÉÒÔÔÚJavaScript½Å±¾Öбàд³ÌÐò½øÐÐÎÄ
×ÖÊ


Ïà¹ØÎĵµ£º

javascript¿ª·¢ÏµÁÐ(¿ò¼Ü¡¢´°¿Ú£©

window,ÊÇjavascriptÖÐÕû¸ö¿ò¼ÜÖеĸù¡£Ëü¾ßÓÐÈçÏÂÊôÐԺͷ½·¨£º
ÊôÐÔ£ºlocation,navigate,screen,frameset[],document£¬historyµÈ6¸öÖØÒªµÄÊôÐÔ.
·½·¨£ºsetTineOut()£¬moveTo(),moveBy()£¬resizeBy(),resizeTo()µÈ¼¸¸ö³£Óõķ½·¨¡£
Çë¿´ÈçÏÂÁ½¸öÀý×Ó£º
1¡¢×´Ì¬À¸¶¯Ì¬ÏÔʾÄêÔÂÈÕ
  function setTime() {
 &n ......

·ÖÏíJavaScriptÔÚÏßѹËõ¹¤¾ß

This tool will let you optimize your JavaScript (JScript) code by removing comments, whitespace as well as other unnecessary characters as well as by optionally shortening function / variable / class names.
http://www.xtreeme.com/javascript-optimizer/ ......

JavaScriptÓï·¨¼¯½õ

click()¶ÔÏó.click()ʹ¶ÔÏó±»µã»÷¡£
closed¶ÔÏó.closed¶ÔÏó´°¿ÚÊÇ·ñÒѹرÕtrue/false
clearTimeout(¶ÔÏó)Çå³ýÒÑÉèÖõÄsetTimeout¶ÔÏó
clearInterval(¶ÔÏó)Çå³ýÒÑÉèÖõÄsetInterval¶ÔÏó
confirm("ÌáʾÐÅÏ¢")µ¯³öÈ·ÈÏ¿ò£¬È·¶¨·µ»ØtrueÈ¡Ïû·µ»Øfalse
cursor:Ñùʽ¸ü¸ÄÊó±êÑùʽhandcrosshairtextwaithelpdefaultautoe/s/w/n ......

²âÊÔÒ»ÏÂÄãµÄjavascriptÄÜÁ¦ 14Ìâ,¿´ÄãÄܶԶàÉÙÌâÄ¿


1.
       (function(){
           return typeof arguments;
      })();
“object”
“array”
“arguments”
“undefined”
2.   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ