开发者

HTMl form filling. What should happen when user presses enter?

I'm new to this HTML form stuphs. I developed an app and gave it to someone to test.

I had used MSIE 8 and the other used MS IE 7. On 8, pressing return does nothing, whereas on 7 it submits the form - and the says it is submitted prematurely.

I suppose I might be able to suppress that my making sure that the submit button is not the default control, but the really underlying question is how should an HTML form behave when return is pressed? Is there any general agreement on this?


Clarification:

I don't think I phrased my question correctly. I understand the mechanics from a technical standpoint, but, how shoul开发者_Go百科d the form be designed from a usability standpoint?

Are there industry standards or best practises? As I said, a user choosing combo box items and imputing text fields was using return to mean "I'm finished with that field" and was frustrated to find it meant "I'm finished with the form"


When an input in the form has focus, and the enter key is pressed, and there is only one <input type="submit" ...> then the form should be submitted.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜