Add regular button inside form that does not perform a submit

后端 未结 3 1916
野性不改
野性不改 2020-12-29 02:33

I have this form declaration:

<
相关标签:
3条回答
  • 2020-12-29 02:43

    You could do

    <button type="button">Add Segment</button>
    
    0 讨论(0)
  • 2020-12-29 02:50

    Closer to Occams razor (for complex schemes*) could be to construct the 'form to be submitted' separately, ie, to not (ie, drop the use of) the "form" tag: for a description of the latter, please see "how to ajax post a form that includes fields in a dynamic table for which both rows and columns can be added dynamically"


    * eg, when your form consists of multiple interaction-events, where a subset is used for form-submission.

    0 讨论(0)
  • 2020-12-29 02:52

    Do this:

    <button type="button" class="(rest of your classes)">Rest of your code</button>
    
    0 讨论(0)
提交回复
热议问题