O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

isValid — Check if a URL has valid syntax

Usage

URL.isValid(url)

url : String

Description

Returns true if url has valid syntax; returns false otherwise. Valid URL syntax is summarized in Appendix A. Relative URLs are permitted.

Returns invalid if url can’t be converted to a string.

Examples

URL.isValid("http://www.inhand.net/")

returns Boolean true

URL.isValid("../logo.wbmp")

returns Boolean true

URL.isValid("#frag")

returns Boolean true

URL.isValid("http://www.inhand.net:xxx/")

returns Boolean false

URL.isValid(invalid)

returns invalid

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required