https://www.w3schools.com/TAGs/att_button_type.asp

Definition and Usage

The type attribute specifies the type of button.

Tip: Always specify the type attribute for the <button> element. Different browsers may use different default types for the <button> element.

<button type="button|submit|reset">

因为没有明确定义type,导致chrome和FireFox(webkit),以及 IE11,都把button的type默认设定为submit了,问题找了半天。

经过试验,多个button均不指定type时,chrome也都全设定type为submit。

http://www.w3school.com.cn/tiy/t.asp?f=html_form_submit

 

相关文章:

  • 2021-07-19
  • 2022-01-04
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2021-08-31
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2022-01-07
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
相关资源
相似解决方案