按下回車執行登錄方法

        function EnterKeyUp(e) {
            var code = e.keyCode;
            if (code == "13") {
                var obj = null;
                if (window.event) {
                    obj = document.activeElement;
                }
                else {
                    obj = e.explicitOriginalTarget;
                }
                if (obj == null)
                    return;
                submitClick();
            }
        }



<body onkeyup="EnterKeyUp(event)">

你可能感兴趣的:(方法)