Sets or obtains the specified file name or path of an object.
Alert (window. Location. pathname)
Set or retrieve the entire URL as a string.
Alert (window. Location. href );
Set or obtain the port number associated with the URL.
Alert (window. Location. Port)
Set or obtain the protocol section of the URL.
Alert (window. Location. Protocol)
Set or obtain the segment following the # In the href attribute.
Alert (window. Location. Hash)
Set or obtain the hostname and port numbers of the location or URL.
Alert (window. Location. HOST)
Set or obtain the Section following the question mark in the href attribute.
Alert (window. Location. Search)
Get the value of the variable (extract the part after the equal sign)
VaR url = Window. Location. search;
// Alert (URL. Length );
// Alert (URL. lastindexof ('= '));
VaR loc = URL. substring (URL. lastindexof ('=') + 1, URL. Length );