|
Newsletters
|
|
|
|
|
WMLScript Reference
WMLScript Reference
WMLScript > URL > getHost()
getHost() - The getHost Function
Usage: getHost(url)
Description: Returns the host specified in the given url. Both absolute and relative URLs are supported. Relative URLs are not resolved into absolute URLs. If the host part of the URL is not defined, the function returns an empty string.
Example:var a = URL.getHost("http://www.wirelessdevnet.com/path#frag");
// a = "www.wirelessdevnet.com"
var b = URL.getHost("path#frag");
// b = ""
var c = URL.getHost("zyx://me@ismo.k.oksa#fab");
// c = "ismo.k.oksa"
Bookmark this page
|
|