The pathname property is a string portion of a URL specifying how a particular resource can be accessed.
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:
NOTE:
Although the pathname property can be set at any time, it is
safer to set the href property
to change a location.
document.write(location.pathname)
/products/enquiries.htm
...you could find out the pathname property as follows: