Last active
August 29, 2015 14:01
-
-
Save aliang228/475eef27712750f2f2e9 to your computer and use it in GitHub Desktop.
输入框enter事件触发
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//回车提交 | |
function enterLogin(e){ | |
var e = e || window.event; | |
if(e.keyCode == 13){ | |
... | |
} | |
} | |
<input type="password" id="password" placeholder="输入密码" onkeypress="enterLogin(event)" onkeydown="enterLogin()"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment