diff --git a/app/templates/Posts/question.html b/app/templates/Posts/question.html index 1e63d7d..7756ed9 100644 --- a/app/templates/Posts/question.html +++ b/app/templates/Posts/question.html @@ -124,7 +124,6 @@
@@ -80,16 +80,16 @@

-{# #} +
-{#

#} +


请先完成验证

- @@ -125,23 +125,23 @@ var info = document.getElementById('p1'); var pwd = document.getElementById('inputPassword'); //学号 - {#stuID.onblur = function () {#} - {# var stuid = this.value;#} - {# var reg = /[0-9]{1,4}/;#} + stuID.onblur = function () { + var stuid = this.value; + var reg = /[0-9]{1,4}/; {#var reg = /^\d{1,8}$/;#} - {# // 不符合规则的话#} - {# if (!reg.test(stuid)) {#} - {# info.innerHTML = 'Please enter StudentID or OrganizationID';#} - {# info.className = 'text-danger';#} - {# document.getElementById("submit").disabled = true;#} - {# } else {#} - {# info.innerHTML = '';#} - {# info.className = 'text-success';#} - {# }#} - {# if (info.className == 'text-success') {#} - {# document.getElementById("submit").disabled = false;#} - {# }#} - {#}#} + // 不符合规则的话 + if (!reg.test(stuid)) { + info.innerHTML = 'Please enter StudentID or OrganizationID'; + info.className = 'text-danger'; + document.getElementById("submit0").disabled = true; + } else { + info.innerHTML = ''; + info.className = 'text-success'; + } + if (info.className == 'text-success') { + document.getElementById("submit0").disabled = false; + } + } var handler = function (captchaObj) { $("#submit").click(function (e) { var result = captchaObj.getValidate(); diff --git a/data-dev.sqlite b/data-dev.sqlite index 53ff6ff..b0c9b04 100644 Binary files a/data-dev.sqlite and b/data-dev.sqlite differ