1、展示细节
如男女显示问题 不能显示true false 时间转换成中文 民族显示汉字 不能直接显示代码
2、用户名重复验证
从数据库中查询验证
4、日期判断
判断年份有点问题
var year = document.getElementById("Dr_Year"); var mon = document.getElementById("Dr_Month"); var day = document.getElementById("Dr_Day"); document.getElementById("Dr_Year").onchange = function () { if (mon.value == "2") { if (this.value % 4 == 0) { day.options.length = 0; for (var i = 1; i < 30; i++) { var op = document.createElement("option"); op.value = i; op.innerHTML = i; day.appendChild(op); } } else { day.options.length = 0; for (var i = 1; i < 29; i++) { var op = document.createElement("option"); op.value = i; op.innerHTML = i; day.appendChild(op); } } } } document.getElementById("Dr_Month").onchange = function () { if (this.value == "2") { if (year.value % 4 == 0) { day.options.length = 0; for (var i = 1; i < 30; i++) { var op = document.createElement("option"); op.value = i; op.innerHTML = i; day.appendChild(op); } } else { day.options.length = 0; for (var i = 1; i < 29; i++) { var op = document.createElement("option"); op.value = i; op.innerHTML = i; day.appendChild(op); } } } else if (this.value == "1" || this.value == "3" || this.value == "5" || this.value == "7" || this.value == "8" || this.value == "10" || this.value == "12") { day.options.length = 0; for (var i = 1; i < 32; i++) { var op = document.createElement("option"); op.value = i; op.innerHTML = i; day.appendChild(op); } } else { day.options.length = 0; for (var i = 1; i < 31; i++) { var op = document.createElement("option"); op.value = i; op.innerHTML = i; day.appendChild(op); } } }
5、修改页面无法提交
6、编辑时,如密码不填,则保留原有密码
一般都是单独改密码 统一改的时候在修改方法里面加一个判断
执行语句 如果密码为空则不修改密码
密码不为空在修改
用js判断密码是否一致
var p1 = document.getElementById("TextBox2"); var p2 = document.getElementById("TextBox3"); p1.onkeyup = function () { pwdisok(p1, p2); } p2.onkeyup = function () { pwdisok(p1, p2); } function pwdisok(pwd1, pwd2) { if (pwd1.value != pwd2.value) { document.getElementById("pwd_error").innerText = "两次密码不一致!"; document.getElementById("pwd_error").style.color = "red"; pwdok = false; } else { document.getElementById("pwd_error").innerText = "正确!"; document.getElementById("pwd_error").style.color = "green"; pwdok = true; } }
时间: 2024-10-29 04:03:31