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.
32 lines
1.1 KiB
32 lines
1.1 KiB
$.material.init();
|
|
|
|
function submit() {
|
|
$("#submit_pwd").attr("disabled",1);
|
|
pwd = $("#inputPassword").val();
|
|
if (pwd == "") {
|
|
toastr["error"]("密码不能为空");
|
|
$("#submit_pwd").removeAttr("disabled");
|
|
} else {
|
|
$.post("/Share/chekPwd", {
|
|
password: pwd,
|
|
key: shareInfo.shareId
|
|
}, function(result) {
|
|
if (result.error) {
|
|
toastr["error"](result.msg);
|
|
$("#submit_pwd").removeAttr("disabled")
|
|
} else {
|
|
location.reload();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
$("#submit_pwd").click(function() {
|
|
submit();
|
|
});
|
|
|
|
document.onkeyup = function(e) {
|
|
var code = e.charCode || e.keyCode;
|
|
if (code == 13) {
|
|
submit();
|
|
}
|
|
} |