JavaScript Location Object Properties


hash - part containing the # sign that points to the particular page location
host - URL hostname and port. e.g. http://www.xltd.com:80 The URL (colon/port only included when specified)
hostname - URL hostname section
href - entire URL
pathname - The URL pathname section (including first slash)
port - URL port, e.g.
protocol - e.g. http: file:
search - query string section (includes the question mark)
target - The URL link's target name, e.g. window name, _parent, _blank, _top


click here for a demo
http://www.xltd.com:80/util/location.htm?foo=bar&name=maggie&location=usa#thisAnchor