Javascript String isURL()

Description

Javascript String isURL()


String.prototype.isURL = function () {
    rx = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/i;
    return rx.test(this);
};



PreviousNext

Related