form提交问题

1、如果form中只有一个input字段,那么在input中按enter会触发form submit

2、如果form中有两个或以上个input字段,但是没有buttons 或者 input[type=submit],在input中按enter不会触发form submit

3、如果form中有一个或者多个input字段,并且有一个或者多个buttons 或者 input[type=submit],在input中按enter将触发第一个按钮或输入[type=submit] 的单击处理程序,并在封闭的表单上触发一个提交处理程序

猜你喜欢

转载自blog.51cto.com/13934921/2450212