function rep(the) { var i; var theform; for (i=0;i<(the.all.length);i++) { theform=the(i); if (theform!=null) theform.value=theform.value.replace(/'/g,"''"); } } function frmform1_onsubmit() { rep(frmform1); if (frmform1.name.value =="") { alert("名稱不能為空"); frmform1.name.focus(); return false; }else if (frmform1.contactor.value =="") { alert("聯系人不能為空"); frmform1.contactor.focus(); return false; }else if (frmform1.address.value =="") { alert("地址不能為空"); frmform1.address.focus(); return false; }else if (frmform1.telenumber.value =="") { alert("電話不能為空"); frmform1.telenumber.focus(); return false; }else if (frmform1.email.value =="") { alert("Email不能為空"); frmform1.email.focus(); return false; }else if ( CheckEmail(frmform1.email.value) == -1 ) { alert("Email格式不正确"); frmform1.email.focus(); return false; }else if (frmform1.fromlanguage.value =="") { alert("翻譯方向的從語言不能為空"); frmform1.fromlanguage.focus(); return false; }else if (frmform1.tolanguage.value =="") { alert("翻譯方向的到語言不能為空"); frmform1.tolanguage.focus(); return false; }else if (frmform1.orderscope.value =="" ) { alert("涉及行業領域不能為空"); frmform1.orderscope.focus(); return false; }else if (frmform1.oraladdress.value =="") { alert("口譯地點不能為空"); frmform1.oraladdress.focus(); return false; }else if (frmform1.servicetime.value =="") { alert("需要服務時間總量不能為空"); frmform1.servicetime.focus(); return false; }else return true; } function CheckEmail(str) { re = /^[ ]*[A-Za-z0-9_-]+@{1}[A-Za-z0-9_-]+(.{1}[A-Za-z0-9_-]+){1,3}[ A-Za-z0-9_-]*$/; r = str.search(re); return(r); }
|
||||||||
|
||||||||
|
|
|
|||||||
|