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

javascript: The Browser Object Model(BOM)

window
window¶ÔÏóÊÇä¯ÀÀÆ÷»òÕß¿ò¼Ü×ÔÉí.top×ÜÊÇä¯ÀÀÆ÷,parentÊǸ¸¿ò¼Ü,self±íʾ×Ô¼º.
windowͨ³£¿ÉÒÔÊ¡ÂÔ.
´°¿Ú²Ù×÷: moveBy(dx, dy), moveTo(x, y),
resizeBy(dw, dh), resizeTo(w, h).
µ¼º½: window.open(url, frame
name, attribute). attribute¿ÉÒÔÊÇleft, top, height, width, resizable,
scrollable, toolbar, status, location(all default no). 
window.open
·µ»Øд°¿ÚÒýÓÃ,²¢ÇÒÓÐÒ»¸öopener¶ÔÏó±íʾ¸¸´°¿Ú
window.close.
¶Ô»°¿ò:
alert, confirm, prompt.
״̬À¸: window.status, window.defaultStatus
ʱ
¼ä¼ä¸ôºÍÔÝÍ£: timeoutId = setTimeout("alert('hello world')", 1000);
clearTimeout(timeoutId);ÀàËÆÓÐsetIntervalºÍclearInterval.
ÀúÊ·:
window.history.go(+-n), history.back, history.forward. history.length
document
alert(window.document
== document) == true. ËûÊÇΨһһ¸ö¼ÈÊôÓÚDOMÓÖÊôÓÚBOMµÄ¶ÔÏó
ÊôÐÔ:title, URL,
referrer, lastModified
¼¯ºÏÊôÐÔ: anchors, applets, embeds, forms,
images, links.
·½·¨: write, writeln.
±ØÐëÔÚÍêÈ«ÔØÈëÒ³ÃæÇ°µ÷ÓÃwrite()ºÍwriteln()·½·¨. Èç¹ûÈκÎÒ»¸ö·½·¨ÊÇÔÚÒ³ÃæÔØÈëºóµ÷ÓõÄ,Ëü½«Ä¨È¥Ò³ÃæµÄÄÚÈÝ,ÏÔʾָ¶¨µÄÄÚÈÝ.
location
windowºÍ
documentµÄÊôÐÔ,Ï໥µÈ¼Û.
ÊôÐÔ: hash(λÓÚ#ºóÃæµÄ¶«Î÷), host, hostname, href,
pathname, port, protocol, search(λÓÚ?ºóÃæµÄ¶«Î÷).
·½·¨: assign(),
replace(), reload(false=´Ó»º´æÖе¼Èë(default),true=´Ó·þÎñÆ÷¶Ëµ¼Èë)
navigatorºÍ
screen¶ÔÏó
navigator¶ÔÏó±íʾÁËä¯ÀÀÆ÷±¾Éí,¿ÉÒÔ»ñȡһЩÊôÐÔ,µ«ÊǸ÷¸öä¯ÀÀÆ÷Ö§³Ö²»Í¬.
screen
¶ÔÏó¿ÉÒԵõ½Óû§ÏµÍ³µÄÐÅÏ¢,ÈçavailHeight, availWidth(¿ÉÓÃÆÁÄ»¿í¶ÈºÍ¸ß¶È,ÅųýÁËϵͳÈÎÎñÀ¸), colorDepth,
height, width.


Ïà¹ØÎĵµ£º

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

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

Javascript¿çÓò·ÃÎʽâ¾ö·½°¸

ÓÉÓÚ°²È«·½ÃæµÄ¿¼ÂÇ£¬
Javascript
±»ÏÞÖÆÁË¿çÓò·ÃÎʵÄ
ÄÜÁ¦£¬µ«ÊÇÓÐʱºòÎÒÃÇÏ£ÍûÄܹ»×öһЩºÏÀíµÄ¿çÓò·ÃÎʵÄÊÂÇ飬ÄÇôÔõô°ìÄØ£¿

 

ÕâÀï·ÖÁ½ÀàÇé¿ö£º

        

Ò»¡¢»ùÓÚͬһ¸¸ÓòµÄ×ÓÓòÖ®¼äÒ³ÃæµÄ·ÃÎÊ

     
  &nb ......

js Åжϵ±Ç°ä¯ÀÀÆ÷JavaScriptµÄ°æ±¾

function RegExpTest(){
var ver = Number(ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion());
alert("version=="+ver);
if (ver >= 5.5){ // ²âÊÔ JScript µÄ°æ±¾¡£
var src = "The rain in Spain falls mainly in the plain.";
var re = /\w+/g; // ......

ÓÃjavascriptʵÏÖÒ³ÃæÎÞˢиüÐÂÊý¾Ý

³ÌÐòÉè¼ÆÖлᾭ³£Åöµ½Ò»ÖÖÇé¿ö£¬¾ÍÊÇÊÂÏÈÎÞ·¨µÃÖªÓû§»áÐèÒªÄÄЩÊý¾Ý£¬±ØÐë¸ù¾ÝÓû§Ñ¡ÔñºóÔÙ´Ó·þÎñÆ÷
ÖØÐÂÌáÈ¡Êý¾Ýºó·´À¡¸øÓû§¡£±ÈÈçÒ»¼òµ¥µÄÇé¿ö£¬Óû§Ñ¡ÔñÊ¡·ÝÒÔºó£¬ÎÒÃÇÁ¢¼´»áÔÚÊÐÀï±ß½«Õâ¸öÊ¡µÄËùÓÐ
ÊÐÖØÐÂÏÔʾ³öÀ´¡£ÕâÖÖÇé¿öÒ»°ãÐèÒª½«Õû¸öÒ³Ãæˢкó²Å¿ÉÒÔÖØжÁÈ¡£¬µ«ÕâÑù²»½öЧÂʲ»¸ßÍ⣬ҲÏԵò»
Ì«ÓÅÑÅ¡£Æäʵ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ