function login() {
    if ($('j_username').value == "") {
        $('j_username').focus();
        alert("请填写用户名！");
        return false;
    }
    if ($('j_password').value == "") {
        $('j_password').focus();
        alert("请填写密码！");
        return false;
    }

    $('frmLogin').action = "/j_security_check";
    $('frmLogin').method = "post";
    $('frmLogin').submit();
    return true;
}