WMLScript isValid() Function
The isValid() function returns a boolean value, which is true if the syntax of the specified URL is correct, otherwise it returns false.
Syntax
n = URL.isValid(url)
Component | Description |
---|---|
n | The boolean value returned by the function. |
url | A string. |
Example
var a = URL.isValid("http://www.codew3c.com"); var b = URL.isValid("http//www.codew3c.com"); var c = URL.isValid("http://www.codew3c.com!!!!");
Result
a = "true" b = "false" c = "false"