Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery check valid link

 var myURL;
         function validURL(myURL) {
            var pattern = new RegExp('^(https?://)?'+ // protocol
            '((([a-zd]([a-zd-]*[a-zd])*).?)+[a-z]{2,}|'+ // domain name
            '((d{1,3}.){3}d{1,3}))'+ // ip (v4) address
            '(:d+)?(/[-a-zd%_.~+]*)*'+ //port
            '(?[;&a-zd%_.~+=-]*)?'+ // query string
            '(#[-a-zd_]*)?$','i');
            return pattern.test(myURL);
         }
         document.write(validURL("http://qries.com"));
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #jquery #check #valid #link
ADD COMMENT
Topic
Name
7+1 =