PROPERTY:
Location::pathname
location.pathname
pathname is a property of both the Link
and the Location objects and is a
string portion of a URL specifying how a particular resource can be
accessed. Assuming your current window to be the URL...
http://home.newco.com/products/enquiries.htm#local?email=name@otherco.com
...you could find out the pathname property as follows:
Code:
document.write(location.pathname)
Output:
products/enquiries.htm
NOTE:
Although the pathname property can be set at any time, it is
safer to set the href property
to change a location.
|