锘縡unction mysubmit(id) { var temp = $("#unameId").val(); if (temp == "") { showError(account_can_not_empty); return; } temp = $("#passwordId").val(); if (temp == "") { showError(email_can_not_empty); return; } if ($("#verCode_tr").is(":hidden") == false) { temp = $("#verCode").val(); if (temp == "") { showError(input_captcha); return; } else if (temp.length != 5) { showError(captcah_error); return; } } if ($("#numcode_tr").is(":hidden") == false) { temp = $("#numcode").val(); if (temp == "") { showError(input_captcha); return; } else if (temp.length != 4) { showError(captcah_error); return; } } $("#" + id).submit(); } function showError(name) { $("#show_error").html(name); } function hideError(id) { $("#" + id).hide(); } function setEmpty(id) { $("#" + id).html(""); } function keydownSubmit(event) { e = event ? event : (window.event ? window.event : null); if (e.keyCode == 13) { mysubmit('form'); } } function hideNameInput() { $("#nameNoteId").hide(); $("#unameId").focus(); } function showNameInput() { var v1 = $("#unameId").val(); if (v1 == null || "" == v1) { $("#nameNoteId").show(); } } function hidePwdInput() { $("#pwdNoteId1").hide(); $("#passwordId").focus( $(document).keypress(function(e) { var capsLockKey = e.keyCode ? e.keyCode : e.which; var shifKey = e.shiftKey ? e.shiftKey:((capsLockKey == 16) ? true : false); if(((capsLockKey >= 65 && capsLockKey <= 90) && !shifKey)||((capsLockKey >= 97 && capsLockKey <= 122) && shifKey)){ $("#pass").attr("style", "position: absolute; left: 30px; clear: both; width: 103px; height: 37px; font-size: 12px; line-height: 45px; z-index: 20; text-align: center; opacity: 1;"); }else{ $("#pass").attr("style", "display:none;"); } }) ); $('#passwordId').blur(function() { $("#pass").attr("style", "display:none; "); }); } function showPwdInput() { var v2 = $("#passwordId").val(); if (v2 == null || "" == v2) { $("#pwdNoteId1").show(); } } function hideNameError() { $("#show_error").html(""); $("#nameNoteId").hide(); } function hidePwdError() { $("#show_error").html(""); $("#pwdNoteId1").hide(); } function showNotice(fid) { if (fid == null || fid == "" || fid < 0) { return; } else { $.ajax({ url : "/api/notice?fid=" + fid, type : "get", success : function(date) { var myjson = eval("(" + date + ")"); if (myjson.status == false) { $("#newNotice").attr("style", "display:none;"); }else{ $("#newNotice").attr("style", "text-align:left;margin-left:93px;width:710px;margin-bottom:40px;"); //ss = delHtmlTag(myjson.content); ss=myjson.content; if(fid == 1582 && $.cookie("browserLocale") == "en_US"){ ss ="Recently, we found that some students cheated in the learning process. In order to maintain the fairness of ERYA General Course platform, we are going to conduct a comprehensive examination of student learning data, export cheating students' list, and directly submit the list to the dean's office. Students who cheat on the course would undertake brought serious consequences, such as make-up examinations, course restudy锛宱ther punishments. Please be honest to your courses and examinations!"; } $("#word").html(ss); $("#body_0x004").removeClass("xin_narrow"); $("#notice_0x004").html(myjson.content); $("#notice_box_0x004").show(); } } }); } } function delHtmlTag(str) { return str.replace(/<[^>]+>/g, "");// 鍘绘帀鎵€鏈夌殑html鏍囪 } function showGuide() { $("#remindertext").show(); $("#reminder").addClass("reminder"); $("#body_0x003").removeClass("zin_narrow"); $("#notice_box_0x003").show(); } function hideGuide() { $("#remindertext").html(""); } // dx璁剧疆cookie function setCookie() { var fid = $("#fid").val(); $.ajax({ url : "http://www.fanya.chaoxing.com/passport/setcookie?fid=" + fid, type : "get", success : function(date) { } }); } function getVarCode() { var img = document.getElementById("imgVerCode"); img.src = "/img/code?" + new Date().getTime(); } function getNumCode() { var img = document.getElementById("numVerCode"); img.src = "/num/code?" + new Date().getTime(); }