function submitAction() { //----- EDUCATION LEVEL var tmp_edu_flag ; var tmp_sch ; var tmp_country ; var tmp_prog ; var tmp_fp1 ; var tmp_fp2 ; var tmp_qual ; var tmp_date ; //------ OTHER PROFESSIONAL QUALIFICATIONS var tmp_prof_name ; var tmp_prof_country ; var tmp_year ; var tmp_score ; var tmp_attach_prof ; //---PERSONAL DETAILS //---if (document.form1.title[0].checked || document.form1.title[1].checked){ //---} //---else { //---alert("请填写 「称谓」 !") ; //---return ; //---} if ( myCheckEmptyStr(document.form1.surname_chi.value) == 1) { alert("请填写 「中文姓氏」 !") ; document.form1.surname_chi.select(); document.form1.surname_chi.focus(); return ; } if (!isNaN(document.form1.surname_chi.value)) { alert("「中文姓氏」格式不正确 !") ; document.form1.surname_chi.select(); document.form1.surname_chi.focus(); return ; } if ( myCheckEmptyStr(document.form1.firstName_chi.value) == 1) { alert("请填写 「中文名字」 !") ; document.form1.firstName_chi.select(); document.form1.firstName_chi.focus(); return ; } if (!isNaN(document.form1.firstName_chi.value)) { alert("「中文名字」格式不正确 !") ; document.form1.firstName_chi.select(); document.form1.firstName_chi.focus(); return ; } if ( myCheckEmptyStr(document.form1.surname_py.value) == 1) { alert("请填写 「姓氏拼音」 !") ; document.form1.surname_py.select(); document.form1.surname_py.focus(); return ; } if (!isNaN(document.form1.surname_py.value)) { alert("「姓氏拼音」格式不正确 !") ; document.form1.surname_py.select(); document.form1.surname_py.focus(); return ; } if ( myCheckEmptyStr(document.form1.firstName_py.value) == 1) { alert("请填写 「名字拼音」 !") ; document.form1.firstName_py.select(); document.form1.firstName_py.focus(); return ; } if (!isNaN(document.form1.firstName_py.value)) { alert("「名字拼音」格式不正确 !") ; document.form1.firstName_py.select(); document.form1.firstName_py.focus(); return ; } if ( myCheckEmptyStr(document.form1.birthday_dd.value) == 1){ alert("请填写 「出生日期」 !") ; document.form1.birthday_dd.select(); document.form1.birthday_dd.focus(); return ; } if (isNaN(document.form1.birthday_dd.value) || parseInt(document.form1.birthday_dd.value)!=parseFloat(document.form1.birthday_dd.value) || parseInt(document.form1.birthday_dd.value, 10)<1 || parseInt(document.form1.birthday_dd.value, 10)>31) { alert("「出生日期」格式不正确!") ; document.form1.birthday_dd.select(); document.form1.birthday_dd.focus(); return ; } if (myCheckEmptyStr(document.form1.birthday_mm.value) == 1){ alert("请填写 「出生月份」 !") ; document.form1.birthday_mm.select(); document.form1.birthday_mm.focus(); return ; } if (isNaN(document.form1.birthday_mm.value) || parseInt(document.form1.birthday_mm.value)!=parseFloat(document.form1.birthday_mm.value) || parseInt(document.form1.birthday_mm.value, 10)<1 || parseInt(document.form1.birthday_mm.value, 10)>12) { alert("「出生月份」格式不正确!") ; document.form1.birthday_mm.select(); document.form1.birthday_mm.focus(); return ; } if (myCheckEmptyStr(document.form1.birthday_yy.value) == 1) { alert("请填写 「出生年份」 !") ; document.form1.birthday_yy.select(); document.form1.birthday_yy.focus(); return ; } if (isNaN(document.form1.birthday_yy.value) || parseInt(document.form1.birthday_yy.value)!=parseFloat(document.form1.birthday_yy.value) || parseInt(document.form1.birthday_yy.value, 10)<1800 || parseInt(document.form1.birthday_yy.value, 10)>2050) { alert("「出生年份」格式不正确!") ; document.form1.birthday_yy.select(); document.form1.birthday_yy.focus(); return ; } if (document.form1.sex[0].checked || document.form1.sex[1].checked){ } else { alert("请填写 「性别」 !") ; document.form1.sex[0].select(); document.form1.sex[0].focus(); return ; } if ( myCheckEmptyStr(document.form1.id_number.value) == 1) { alert("请填写 「身份证号码」 !") ; document.form1.id_number.select(); document.form1.id_number.focus(); return ; } if ( myCheckEmptyStr(document.form1.attach_id_1.value) == 1) { alert("请呈交 「身份证号码附件」 !") ; document.form1.attach_id_1.select(); document.form1.attach_id_1.focus(); return ; } if ( myCheckEmptyStr(document.form1.address.value) == 1 ) { alert("请填写 「通讯地址」 !") ; document.form1.address.select(); document.form1.address.focus(); return ; } if ( myCheckEmptyStr(document.form1.postal.value) == 1 ) { alert("请填写 「邮编」 !") ; document.form1.postal.select(); document.form1.postal.focus(); return ; } if ( myCheckEmptyStr(document.form1.email.value) == 1 ) { alert("请填写 「电邮」 !") ; document.form1.email.select(); document.form1.email.focus(); return ; } if ( myCheckEmptyStr(document.form1.tel_mobile.value) == 1 ) { alert("请填写 「手机号码」 !") ; document.form1.tel_mobile.select(); document.form1.tel_mobile.focus(); return ; } //------- PROGRAMME APPLIED FOR if ( myCheckEmptyStr(document.form1.prog_app_1.value) == 1){ alert("请填写 「报读专业」 !") ; document.form1.prog_app_1.select(); document.form1.prog_app_1.focus(); return ; } if ( myCheckEmptyStr(document.form1.prog_app_no_1.value) == 1){ alert("请填写 「报读专业」 !") ; document.form1.prog_app_no_1.select(); document.form1.prog_app_no_1.focus(); return ; } //------- EXAMINATION RESULTS if (document.form1.course[0].checked || document.form1.course[1].checked){ } else { alert("您所修读的是") ; document.form1.course[0].select(); document.form1.course[0].focus(); return ; } if (document.form1.exam_province[0].checked || document.form1.exam_province[1].checked || document.form1.exam_province[2].checked || document.form1.exam_province[3].checked || document.form1.exam_province[4].checked || document.form1.exam_province[5].checked || document.form1.exam_province[6].checked || document.form1.exam_province[7].checked || document.form1.exam_province[8].checked || document.form1.exam_province[9].checked || document.form1.exam_province[10].checked || document.form1.exam_province[11].checked || document.form1.exam_province[12].checked || document.form1.exam_province[13].checked || document.form1.exam_province[14].checked || document.form1.exam_province[15].checked || document.form1.exam_province[16].checked || document.form1.exam_province[17].checked || document.form1.exam_province[18].checked || document.form1.exam_province[19].checked || document.form1.exam_province[20].checked || document.form1.exam_province[21].checked || document.form1.exam_province[22].checked || document.form1.exam_province[23].checked || document.form1.exam_province[24].checked){ } else { alert("请选择 「高考试卷所属省市」 !") ; document.form1.exam_province[0].select(); document.form1.exam_province[0].focus(); return ; } //------- EDUCATION LEVEL //-------tmp_edu_flag = 0 ; for (var i=1; i<=5 ;i++ ){ tmp_sch = eval("document.form1.edu_sch_" + i + ".value") ; tmp_country = eval("document.form1.edu_country_" + i + ".value") ; //-------tmp_prog = eval("document.form1.edu_prog_" + i + ".value") ; //-------tmp_fp1 = eval("document.form1.edu_fp_" + i + "[0].checked") ; //-------tmp_fp2 = eval("document.form1.edu_fp_" + i + "[1].checked") ; tmp_qual = eval("document.form1.edu_qual_" + i + ".value") ; tmp_date = eval("document.form1.edu_date_" + i + ".value") ; if ( myCheckEmptyStr(tmp_sch) != 1 || myCheckEmptyStr(tmp_country) !=1 || myCheckEmptyStr(tmp_qual) != 1 || myCheckEmptyStr(tmp_date) != 1 ) { if ( myCheckEmptyStr(tmp_sch) != 1 && myCheckEmptyStr(tmp_country) !=1 && myCheckEmptyStr(tmp_qual) != 1 && myCheckEmptyStr(tmp_date) != 1 ) { //-------if (tmp_fp1 || tmp_fp2){ //-------tmp_edu_flag = 1 ; //-------} } else { //-------if (tmp_edu_flag == 0) { alert("请填写 「教育背景」 !") ; document.form1.edu_sch_1.select(); document.form1.edu_sch_1.focus(); //document.getElementById( i ).select(); return ; //-------} } } } //------ OTHER PROFESSIONAL QUALIFICATIONS for (var i=1; i<=5 ;i++ ){ tmp_prof_name = eval("document.form1.prof_name_" + i + ".value") ; tmp_prof_country = eval("document.form1.prof_country_" + i + ".value") ; tmp_year = eval("document.form1.prof_year_" + i + ".value") ; tmp_score = eval("document.form1.prof_score_" + i + ".value") ; tmp_attach_prof = eval("document.form1.attach_prof_" + i + ".value") ; if (myCheckEmptyStr(tmp_prof_name) != 1 || myCheckEmptyStr(tmp_prof_country) != 1 || myCheckEmptyStr(tmp_year) != 1 || myCheckEmptyStr(tmp_score) != 1 || myCheckEmptyStr(tmp_attach_prof) != 1 ) { if (myCheckEmptyStr(tmp_prof_name) != 1 && myCheckEmptyStr(tmp_prof_country) != 1 && myCheckEmptyStr(tmp_year) != 1 && myCheckEmptyStr(tmp_score) != 1 && myCheckEmptyStr(tmp_attach_prof) != 1 ) { } else { alert("请填写 「其它专业资格或公开考试成绩」 !") ; document.form1.prof_name_1.select(); document.form1.prof_name_1.focus(); return ; } } } //---------- Checklist if (document.form1.checklist[0].checked && document.form1.checklist[1].checked && document.form1.checklist[2].checked ){ } else { alert("请填写 「核对表」 !") ; document.form1.checklist[0].select(); document.form1.checklist[0].focus(); return ; } //------- DECLARATION if (document.form1.declare_flag.checked ) { } else { alert("请填写 「本人確認以上声明」 !") ; document.form1.declare_flag.select(); document.form1.declare_flag.focus(); return ; } //---------- Confirm Submit if ( confirm("是否確定送出?") ) { document.form1.action.value = 'submit' ; document.form1.submit() ; } } function myCheckEmptyStr(tmpSrc) { var j = 0 ; var tmpFlag = 1; while ( j < tmpSrc.length ) { if ( tmpSrc.charAt(j) != ' ' ) { tmpFlag = 0 ; break ; } j ++ ; } return tmpFlag ; }