Wednesday, March 11, 2009

URL Validation In Javascript

function isUrl(url)
{
var RegexUrl = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
return RegexUrl.test(url);
}

No comments:

Post a Comment