1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| $("#Password").keypress(function (e) {
var keyCode = e.which ? e.which : e.keyCode;
if (keyCode == 13) {
$("#submitButton").focus().click();
}
});
$("#submitButton").click(function () {
var $form = $("form");
if (!$form.valid())
return;
try {
var password = document.getElementById("Password");
var RSA = document.getElementById("RSA");
var objRSA = new RSAKey();
objRSA.setPublic(varRSA.e, varRSA.n);
var response = objRSA.encrypt(password.value);
if (!response)
return;
RSA.value = General.StringToHex(hex2b64(response));
password.value = "a1b2c3d4e5f6g7h8j9k0".substring(0, password.value.length);
$form.submit();
} catch (e) {
alert(M092);
document.getElementById("UserID").focus();
return;
}
});
}); |
Partager