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

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

I\'ve got a form, with 2 buttons



8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 06:01

    Just use good old HTML:

    
    

    Wrap it as the subject of a link, if you so desire:

    
    

    Or if you decide you want javascript to provide some other functionality:

    
    

提交回复
热议问题