添加期末大作业文件夹Project,目前与Assignment5中一致

This commit is contained in:
typingbugs
2024-05-26 21:49:58 +08:00
parent 53d8334ba3
commit 8dd5a17062
12 changed files with 542 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
var modify = {}
modify.showModifyPassword = function() {
let modifyType = document.getElementById('modifyType').value
let info = {
modifyPasswordLis: document.getElementsByClassName('modifyPassword'),
modifymobileNoLis: document.getElementsByClassName('modifymobileNo'),
}
// 遍历隐藏所有元素
for (let key in info) {
let elements = info[key];
for (let item of elements) {
item.style.display = 'none'; // 确保所有相关元素被隐藏
}
}
// 根据 modifyType 显示相关元素
if (modifyType === "2") {
for (let item of info.modifyPasswordLis) {
item.style.display = 'block';
}
} else if (modifyType === "3") {
for (let item of info.modifymobileNoLis) {
item.style.display = 'block';
}
}
}