How to submit a form when the return key is pressed?

前端 未结 15 1058
既然无缘
既然无缘 2020-11-28 04:25

Can someone please tell me how to submit an HTML form when the return key is pressed and if there are no buttons in the form? The submit button is not there

15条回答
  •  长情又很酷
    2020-11-28 05:07

    Since display: none buttons and inputs won't work in Safari and IE, I found that the easiest way, requiring no extra javascript hacks, is to simply add an absolutely positioned

提交回复
热议问题