WMLScript getPort() function
The getPort() function returns the port number specified in the URL.
Syntax
n = URL.getPort(url)
Component | Description |
---|---|
n | The string returned from the function. |
url | A string. |
Example
var a = URL.getPort("http://codew3c.com:80"); var b = URL.getPort("http://codew3c.com");
Result
a = "80" b = ""