|
Newsletters
|
|
|
|
|
WMLScript Reference
WMLScript Reference
WMLScript > URL > getPort()
getPort() - The getPort Function
Usage: getPort(url)
Description: Returns the port number specified in the given url. If no port is specified then an empty string is returned. Both absolute and relative URLs are supported. Relative URLs are not resolved into absolute URLs.
Example:var a = URL.getPort("http://www.wirelessdevnet.com:80/path#frag");
// a = "80"
var b = URL.getPort("http://www.wirelessdevnet.com/path#frag");
// b = ""
Bookmark this page
|
|