Can I make a <button> not submit a form?

前端 未结 8 1171
耶瑟儿~
耶瑟儿~ 2020-11-22 05:36

I\'ve got a form, with 2 buttons



8条回答
  •  误落风尘
    2020-11-22 06:04

    The button element has a default type of submit.

    You can make it do nothing by setting a type of button:

    
    

提交回复
热议问题