- <scripttype="text/javascript">
- functionFrmAddLink_onsubmit(){
- varisMobile=/^(?:13\d|15\d)\d{5}(\d{3}|\*{3})$/;
- varisPhone=/^((0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$/;
- if(document.getElementById("name").value.trim()==""){
- alert("对不起,请输入名称!");
- document.getElementById("name").focus();
- returnfalse;
- }
- varphone=document.getElementById("phone").value.trim();
- if(phone==""){
- alert("对不起,请输入联系电话!");
- document.getElementById("phone").focus();
- returnfalse;
- }
- if(!isMobile.test(phone)&&!isPhone.test(phone)){
- alert("对不起,请输入正确的手机号码或电话号码\n\n例如:13916752109或0712-3614072!");
- document.getElementById("phone").focus();
- returnfalse;
- }
- returntrue;
- }
- </script>