var mnu; var WindowID; $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); WindowID = $.SystemGeneral.getUrlParam("WindowID"); }); $("body").keydown(function () { if (event.keyCode == "13") {//keyCode=13是回车键 search(); //换成按钮的id即可 } }); function search() { var examineeNum = $("#SerchExamineeNum").val(); //var idNumber = $("#SerchIDNumber").val(); var userName = $("#SerchUserName").val(); var verifyCode = $("input[name='VerifyCode']").val(); if (examineeNum == null || examineeNum == "") { $.messager.alert("系统提示", "请输入考生号"); return; } if (userName == null || userName == "") { $.messager.alert("系统提示", "请输入姓名"); return; } if (verifyCode == null || verifyCode == "") { $.messager.alert("系统提示", "请输入验证码"); return; } $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Account/NewStudentEnter', { examineeNum: examineeNum, verifyCode: verifyCode, userName: userName }, function (data) { if (data != null && data != "") { if (data == "错误") { $.messager.alert("系统提示", "验证码输入错误!"); $("input[name='VerifyCode']").val(""); $("#vcodeimg").click(); return; } $("#massagediv").show(); $("#searchdiv").hide(); $("#examineeNum").val(data.ExamineeNum); $("#userName").val(data.Name); $("#yearID").val(data.YearID); $("#standardCode").val(data.StandardCode); $("#standardName").val(data.StandardName); $("#educationName").val(data.EducationName); $("#learningformName").val(data.LearningformName); $("#learnSystem").val(data.LearnSystem); } else { $("#searchdiv").hide(); $("#NotResult").show(); } }); } function print() { var examineeNum = $("#SerchExamineeNum").val(); var userName = $("#SerchUserName").val(); var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Account/Report'; //window.open(redirectTo, "_blank"); $.popupTopWindow('录取通知书打印', redirectTo, 710, 540, null, { examineeNum: examineeNum, userName: userName }); } function goback() { $("#NotResult").hide(); $("#massagediv").hide(); $("#searchdiv").show(); $("input[name='VerifyCode']").val(""); $("#vcodeimg").click(); }