标签:js
var Utils = { isUrl : function(str_url) { var strRegex = "^((https|http|ftp|rtsp|mms)://)?[a-z0-9A-Z]{3}\.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z]\.com|net|cn|cc (:s[0-9]{1-4})?/$"; var re = new RegExp(strRegex); //re.test() if (re.test(str_url)) { return true; } else { return false; } } };
标签:js
原文地址:http://blog.csdn.net/u010959000/article/details/41731177