html5 输入框响应enter按键
code
<html>
<body>
<input onkeydown="if(event.keyCode==13) {test()}"/>
<script>
function test() {
alert(123);
}
</script>
</body>
</html>
code
<html>
<body>
<input onkeydown="if(event.keyCode==13) {test()}"/>
<script>
function test() {
alert(123);
}
</script>
</body>
</html>