- 注册时间
- 2013-3-22
- 最后登录
- 2017-12-26
- 阅读权限
- 10
- 积分
- 683
- 精华
- 0
- 帖子
- 170
|
我现在做一个修改密码界面,但是在前台比较新密码和确认密码,没有获取到新密码和确认密码?
<table style="table-layout: fixed;">
<tr>
<td style="width: 70px;">
原密码:
</td>
<td style="width: 150px;">
<input name="Pass" required="true" vtype="minLength:5" class="mini-password" minlengtherrortext="密码不能少于5个字符" />
</td>
</tr>
<tr>
<td style="width: 70px;">
新密码:
</td>
<td style="width: 150px;">
<input name="NewPass" required="true" class="mini-password" vtype="minLength:5" minlengtherrortext="密码不能少于5个字符" />
</td>
</tr>
<tr>
<td style="width: 70px;">
确认密码:
</td>
<td style="width: 150px;">
<input name="NewPass1" required="true" class="mini-password" vtype="minLength:5" minlengtherrortext="密码不能少于5个字符" />
</td>
</tr>
</table>
function SaveData() {
var o = form.getData();
form.validate();
if (form.isValid() == false) return;
var key0 = mini.get("NewPass").getValue();
var key1 = mini.get("NewPass1").getValue();
alert(key0);
if (key != key1) {
alert("新密码与确认密码不相同!");
return;
}
var json = mini.encode([o]);
$.ajax({
url: "",
data: { data: json },
cache: false,
success: function (text) {
alert("密码修改成功");
//CloseWindow("save");
},
error: function (jqXHR, textStatus, errorThrown) {
alert(jqXHR.responseText);
CloseWindow();
}
});
}
|
|