PROPERTY:
Location::hash
location.hash
hash is a property of both the Link
and the Location objects and is a
string beginning with a hash (#). It specifies an anchor name in an
HTTP URL. For example, assuming the following URL to be your current
window...
http://home.newco.com/products/enquiries.htm#local?email=name@otherco.com
...you could find out the hash property as follows:
Code:
document.write(location.hash)
Output:
#local?email=name@otherco.com
NOTE:
Although the hash property can be set at any time, it is safer
to set the href property to
change a location
|