在html输入框中响应enter键盘------介绍onkeydown方法
用onkeydown即可解决html输入框中enter键, 如下:
<html>
<body>
<input onkeydown="if(event.keyCode==13) {show()}"/>
<script>
function show()
{
alert("yes");
}
</script>
&a
原创
2019-01-01 03:00:38 ·
55930 阅读 ·
0 评论