PROPERTY:
Location::port
location.port
port is a property of both the Link
and the Location objects and is a
string specifying the communications port that the server uses. If this
is the default of 80, then it is not specified, with the result that
the hostname property will be the same as the host property.
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 port property as follows:
Code:
document.write(location.port)
Output:
80
NOTE:
Although the port property can be set at any time, it is safer
to set the href property to
change a location.
|