Is it true that HTML forms cannot be submitted (with enter) if the nores submit button?

I find that if I have a form without a submit button, it will not be submitted (with an enter key). But if I add a submit button, it works

No submit button http://jsfiddle.net/VxF42/1/
With submit button http://jsfiddle.net/VxF42/

I'm a little confused why this works -> 1 form element / submit button

http://jsfiddle.net/VxF42/1/

It seems that if I have a form with more than 1 form element, do I need a submit button? As I don’t have a submit button. I will use jQuery UI Dialog Buttons

+3
source share
3 answers

, HTML- submit ( enter), ?

, . .

javascript triger, , .

+2

, .

, , ( , , ), , , .

<form>
 <input>
</form>

, Firefox 4, IE 8, Chrome 9, Opera 10 Safari 5.

+2

in jquery, you can use the .submit () method for the input element, which I assume. I know that I did the same without the submit button.

+1
source

Source: https://habr.com/ru/post/1785123/


All Articles