[英]Click event triggered by enter key
I've created in Javascript a click event on a <button type="submit">
in a form
element.我在 Javascript 中在
form
元素的<button type="submit">
上创建了一个点击事件。 This event is also triggered when I press the enter key.当我按下回车键时也会触发此事件。 Is this default html behavior?
这是默认的 html 行为吗?
<input type=submit>
in the form gets the automatic Enter Key behavior.表单中的
<input type=submit>
获取自动 Enter Key 行为。 This is known as an implicit form submission.这称为隐式表单提交。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.