...">

Why are forms not submitted if there is more than one unnamed input?

<form method="POST" action="">
    <input type="text" />
    <input type="text" />
</form>

( JSFiddle )

Press enter on input. Then delete one of inputand click it again. When we have two inputs inside the form, the form does not appear (we need a button). Why is this?

+5
source share
3 answers

The default behavior of single-entry HTML forms is to submit. Once you add a second input, pressing the enter button will no longer submit the form. The presence or absence of names has nothing to do with it.

+7
source

, , , . , : Enter. , , . .

, , , : Enter, , , .

, IE ( IE 4) , Enter , . , (mis?) "". , , , . , , .

, , , . , , .

+3

[type = submit] - . : hidden css, , .

0
source

All Articles