/** * @ 匹配URL地址 */ function isURLAddress(url) { var urlreg=/^((https|http|ftp|rtsp|mms)?:\/\/)+[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\‘:+!]*([^<>\"\"])*$/ if (!urlreg.test(url)){ return false }else{ return true; } }
时间: 2024-10-15 03:54:38
/** * @ 匹配URL地址 */ function isURLAddress(url) { var urlreg=/^((https|http|ftp|rtsp|mms)?:\/\/)+[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\‘:+!]*([^<>\"\"])*$/ if (!urlreg.test(url)){ return false }else{ return true; } }