还没想好要干什么
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Trailblazer/front-end/js/welcomepage_message.js

55 lines
1.5 KiB

function forgotPasswd() {
showDialog("( ̄﹏ ̄;)", "欸这个嘛...我还没做完呢...( ̄﹏ ̄;)");
}
function closeDialog() {
$("#dialogMask").fadeOut(400);
}
function checkInputDataCorrect(username, password) {
if (username == "" || passwd == "") {
showMessage("用户名和密码都不可以是空的哦");
return false;
}
if (!isLetter(username)) {
showMessage("用户名只能是大小写字母和数字哦");
return false;
}
if (!isNormalCharacter(passwd)) {
showMessage("不知道你往密码框都搞了点什么东西...");
return false;
}
return true;
}
function showMessage(message) {
$("#errMsgBox")[0].innerHTML = `<p>${message}</p>`;
}
function clearMessage() {
$("#errMsgBox")[0].innerHTML = ``;
}
function showDialog(title, message) {
html = `<div class="dialogContentBox">
<div class="titleBox">
<p id="title">${title}</p>
</div><hr>
<div class="bodyBox">
<p id="bodyText">${message}</p>
</div>
<div class="bottonBox">
<button id="okbtn">知道啦</button>
</div>
</div>`;
dialogMask = $("#dialogMask");
dialogMask[0].innerHTML = html;
$(".dialogContentBox .bottonBox #okbtn").click(closeDialog);
dialogMask.fadeIn(400);
dialogMask.css("display", "block");
}