//验证url var url=$("#address").val(); var regUrl = /^http[s]{0,1}://.+$/ ; if(url.match(regUrl)==null){ $.dialog.tips("地址格式不正确!"); return; }