<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_Tutorial%2FLocation%2FLocation</id>
		<title>JavaScript Tutorial/Location/Location - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_Tutorial%2FLocation%2FLocation"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_Tutorial/Location/Location&amp;action=history"/>
		<updated>2026-04-04T12:47:17Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_Tutorial/Location/Location&amp;diff=9217&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_Tutorial/Location/Location&amp;diff=9217&amp;oldid=prev"/>
				<updated>2010-05-26T08:24:54Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 08:24, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_Tutorial/Location/Location&amp;diff=9216&amp;oldid=prev</id>
		<title> в 18:52, 25 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_Tutorial/Location/Location&amp;diff=9216&amp;oldid=prev"/>
				<updated>2010-05-25T18:52:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Change location.href==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;script language=&amp;quot;JavaScript&amp;quot; type = &amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
if (top==self)&lt;br /&gt;
{&lt;br /&gt;
    var main_frame = &amp;quot;http://www.wbex.ru&amp;quot;;&lt;br /&gt;
    var cur_url = self.location.href;&lt;br /&gt;
    var setframes = main_frame + &amp;quot;?&amp;quot; + cur_url;&lt;br /&gt;
    location.href = setframes;&lt;br /&gt;
}&lt;br /&gt;
//--&amp;gt;&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Location object represents the current Web address displayed in the browser.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Properties and Methods of the Location Object&amp;lt;/p&amp;gt;&lt;br /&gt;
Property/Method&lt;br /&gt;
Description&lt;br /&gt;
hash&lt;br /&gt;
Represents an anchor name in the URL that begins with the # character&lt;br /&gt;
host&lt;br /&gt;
Represents the hostname and port number of the URL&lt;br /&gt;
hostname&lt;br /&gt;
Represents the hostname part of the URL&lt;br /&gt;
href&lt;br /&gt;
Represents the complete URL&lt;br /&gt;
pathname&lt;br /&gt;
Represents the pathname part of the URL&lt;br /&gt;
port&lt;br /&gt;
Represents the port part of the URL&lt;br /&gt;
protocol&lt;br /&gt;
Represents the protocol part of the URL&lt;br /&gt;
reload()&lt;br /&gt;
Reloads the current URL&lt;br /&gt;
replace()&lt;br /&gt;
Loads a new Web page in the current browser&lt;br /&gt;
search&lt;br /&gt;
The search part of the URL, including the ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Creating a Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to get the current location value.&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;getLoc&amp;quot; value=&amp;quot;Get Location&amp;quot;&lt;br /&gt;
       onClick=&amp;quot;alert(&amp;quot;The current location is: &amp;quot; + document.location)&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.assign()==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Syntax&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
location.assign(URL)&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.hash==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The hash property refers to the anchor portion of the URL, including the hash symbol (#).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the URL contains a pound sign (#), this returns the content after it (for example, http://www.wbex.ru/index#section1 has a hash equal to &amp;quot;#section1&amp;quot;).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the hash property of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function show(){&lt;br /&gt;
          alert(document.location.hash);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to get the current location.hash&lt;br /&gt;
    value of the following address:&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    http://www.wbex.ru&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;getLoc&amp;quot; value=&amp;quot;Get hash value&amp;quot; onClick=&amp;quot;show()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.host==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The host property represents the host portion of the URL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This is composed of the hostname and the port number (if available).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;for example, www.wbex.ru.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the hash property of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function show(){&lt;br /&gt;
         alert(document.location.host);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to get the current location.host value of the following address:&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    http://www.wbex.ru&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;getLoc&amp;quot; value=&amp;quot;Get host&amp;quot; onClick=&amp;quot;show()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.hostname==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The hostname property represents the hostname portion of the URL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the hostname property of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function show(){&lt;br /&gt;
         alert(document.location.hostname);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to get the current location.hostname&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    http://www.wbex.ru&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;gethost&amp;quot; value=&amp;quot;Get hostname&amp;quot; onClick=&amp;quot;show()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.href==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The href property represents the entire URL string for the current page displayed in the browser.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the href property of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function show(){&lt;br /&gt;
         document.location.href =&amp;quot;http://www.wbex.ru&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to set the current location.href value of the following address:&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    http://www.wbex.ru&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;sethref&amp;quot; value=&amp;quot;Set href&amp;quot; onClick=&amp;quot;show()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.pathname==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The pathname property represents the pathname portion of the URL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the pathname for http://www.wbex.ru/pictures/index.htm is &amp;quot;/pictures/index.htm&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the pathname property of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function show(){&lt;br /&gt;
         alert(document.location.pathname);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to get the current location.pathname value of the following address:&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    http://www.wbex.ru&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;getLoc&amp;quot; value=&amp;quot;Get pathname&amp;quot; onClick=&amp;quot;show()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.port==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The port property represents the port portion of the URL. This normally follows the hostname, but is not always available.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;http://www.wbex.ru:8080/index.htm, the port is equal to 8080.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the port property of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function show(){&lt;br /&gt;
         alert(document.location.port);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to get the current location.port value of the following address:&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    http://www.wbex.ru&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;getport&amp;quot; value=&amp;quot;Get port&amp;quot; onClick=&amp;quot;show()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.protocol==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The protocol property represents the protocol portion of the URL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This is located in the beginning of the URL address (the text before ://).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the protocol for http://www.wbex.ru is http: and the protocol for ftp://www.yourserver.ru is ftp:.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the protocol property of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function show(){&lt;br /&gt;
        alert(document.location.protocol);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to get the current location.protocol value of the following address:&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    http://www.wbex.ru&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;getproto&amp;quot; value=&amp;quot;Get protocol&amp;quot; ?onClick=&amp;quot;show()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.reload(false) to reload from the cache==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The reload() method reloads the current page displayed in the browser.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the reload method of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to reload the current page.&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Location.hash value: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;text1&amp;quot; size=20&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;load&amp;quot; value=&amp;quot;Reload page&amp;quot; onClick=&amp;quot;document.location.reload(false)&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.reload() to reload from cache==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The reload() method reloads the current page displayed in the browser.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the reload method of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to reload the current page.&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Location.hash value: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;text1&amp;quot; size=20&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;load&amp;quot; value=&amp;quot;Reload page&amp;quot; onClick=&amp;quot;document.location.reload()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.reload(true) to reload from the server==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The reload() method reloads the current page displayed in the browser.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the reload method of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to reload the current page.&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Location.hash value: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;text1&amp;quot; size=20&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;load&amp;quot; value=&amp;quot;Reload page&amp;quot; onClick=&amp;quot;document.location.reload(true)&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.replace()==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Syntax&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
location.replace(URL)&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location replace in action==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
        &amp;lt;title&amp;gt;You won&amp;quot;t be able to get back here&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
        &amp;lt;P&amp;gt;You won&amp;quot;t be coming back here.&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
            setTimeout(function () {&lt;br /&gt;
                location.replace(&amp;quot;http://www.wbex.ru/&amp;quot;);&lt;br /&gt;
            }, 1000);&lt;br /&gt;
        &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Location.search==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The search property represents the query portion of the URL, including the preceding question mark.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the search for http://www.wbex.ru/search.htm?term=javascript is ?term=javascript.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the search property of the Location object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function show(){&lt;br /&gt;
         alert(document.location.search);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Click the button to get the current location.search&lt;br /&gt;
    value of the following address:&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    http://www.wbex.ru&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;getsearch&amp;quot; value=&amp;quot;Get search&amp;quot; onClick=&amp;quot;show()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>