WMLScript isValid() Function

The isValid() function returns a boolean value, if the syntax of the specified URL is correct, it returns true, otherwise it returns false.

Syntax

n = URL.isValid(url)
Component Description
n Boolean value returned by the function.
url Isang 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"