日期:2014-05-17 浏览次数:20481 次
window.LCount = 0;
$(function () {
var gongHao = $('#txtNO'), uid = $('#txtUid'), pwd = $('#txtPwd');
gongHao.bind('keydown', function (e) {
var key = e.which;
if (key == 13) {
if (checkEmpty(1)) {
pwd.focus();
}
}
});
pwd.bind('keydown', function (e) {
var key = e.which;
if (key == 13) {
$("#btnLogin").click();
}
});
$('#btnLogin').bind('keydown', function (e) {
var key = e.which;
if (key == 13) {
$("#btnLogin").click();
}
});
function action(rValue) {
var result = eval("(" + rValue + ")");
if (result.status == 0) {
uid.val(result.message);
pwd.focus();
}
};
function checkEmpty(e) {
if ($.trim(gongHao.val()) == '') {
$('#btnLogin').val("登 录");
alert("工号不能为空!");
gongHao.focus();
return false;
}
else if (e == 2) {
if ($.trim(pwd.val()) == '') {
$('#btnLogin').val("登 录");
alert("密码不能为空!");
pwd.fo