ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: DOM Location ¶ÔÏó

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

HTML DOM
DOM Input Checkb..
DOM Input File ¶..
DOM Input Hidden..
DOM Input Passwo..
DOM Input Radio ..
DOM Input Reset ..
DOM Input Submit..
DOM Input Text ¶..
DOM Link ¶ÔÏó
DOM Location ¶ÔÏ..
DOM Meta ¶ÔÏó
DOM Navigator ¶Ô..
DOM ¶ÔÏó
DOM Option ¶ÔÏó
DOM Screen ¶ÔÏó
DOM Select ¶ÔÏó
DOM Style ¶ÔÏó
DOM Table ¶ÔÏó
DOM TableData ¶Ô..
DOM TableHeader ..

DOM Location ¶ÔÏó


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:4933 :: ::

Location ¶ÔÏó

The Location object is an object that can be accessed through the location property of the Window object.
Location¶ÔÏó¿Éͨ¹ýwindow¶ÔÏóµÄlocationÊôÐÔ·ÃÎʵ½¡£

The Location object contains information about the current URL.
Location¶ÔÏó°üº¬Á˵±Ç°URLµÄÐÅÏ¢

¾ÙÀý: ½«Óû§´«Ë͵½Ðµĵط½/URL

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

Location ¶ÔÏóÊôÐÔ

Property
ÊôÐÔ
Description
ÃèÊö
IE F N W3C
hash Sets or returns the part of the href property that follows the hash sign (#)
ÉèÖûò·µ»ØhrefÊôÐÔÖÐÔÚ#·ûºÅºóÃæµÄÄÚÈÝ
3 1 2  
host Sets or returns the hostname and port number of the location or URL
ÉèÖûò·µ»ØURL»ò±¾µØËùÔÚµÄÓòÃûÒÔ¼°¶Ë¿ÚºÅ
3 1 2  
hostname Sets or returns the hostname of the location or URL
ÉèÖûò·µ»Ø±¾µØ»òÊÇURLËùÔÚµÄÓòÃû
3 1 2  
href Sets or returns the entire URL
ÉèÖûò·µ»ØÍêÕûµÄURL
3 1 2  
pathname Sets or returns the file name or path specified by the location object
ÉèÖûò·µ»ØÓÉlocation¶ÔÏóÖ¸¶¨µÄfileÃû³Æ»òÊÇ·¾¶
3 1 2  
port Sets or returns the port number associated with the URL
ÉèÖûò·µÓëURLÓйصĶ˿ںÅ
3 1 2  
protocol Sets or returns the protocol part of the URL
ÉèÖûò·µ»ØURL²¿·ÖËùʹÓõÄЭÒé
3 1 2  
search Sets or returns the part of the href property that follows the question mark (?)
ÉèÖûò·µ»ØhrefÊôÐÔÀï?ºÅÖ®ºóµÄÄÚÈÝ
3 1 2  

Location ¶ÔÏó·½·¨

Method
·½·¨
Description
ÃèÊö
IE F N W3C
assign("URL") Loads a new document
¼ÓÔØÐµÄÎĵµ
4 1 2  
reload() Reloads the current document
ÖØÐÂÔØÈ뵱ǰÎĵµ
4 1 2  
replace("URL") Replaces the current document with the one specified
ÓÃÒ»Ö¸¶¨µÄÎĵµÀ´Ìæ»»µ±Ç°µÄÎĵµ
4 1 3  

ÆÀÂÛ (0) All