HTML form表单回车触发提交

<script type="text/javascript">
    function submitByEnter()
    {
        if(event.keyCode == 13)
        {
            login();
            document.getElementByIdx_x("password").value="";
        }
    }
</script>
<form class="mainmenu" onkeydown="submitByEnter();">

posted @ 2015-06-08 19:19  start逍遥  阅读(1225)  评论(0编辑  收藏  举报