javascript location host
| host | NN 2 IE 3 DOM n/a |
|
|
Read/Write |
|
Provides the combination of the hostname and port (if any) of the server that serves up the current document. If the port is explicitly part of the URL, the hostname and port are separated by a colon, just as they are in the URL. |
|
| Example | |
if (location.host == "www.royh.cn:80") {
...
}
|
|
| Value | |
|
String of hostname, optionally followed by a colon and port number. |
|
| Default | |
|
Depends on server. |
|
Previous: javascript location hostname
Next: javascript location hash
1201,Nickname,Homepage or email,Comments here,Add comment
