Submit button not working in Bootstrap form

后端 未结 4 2010
谎友^
谎友^ 2021-01-01 09:48

I have a form in Bootstrap 3 that\'s inside a modal. There\'s a button called \"submit\" where when it\'s clicked the stuff that was entered in the form should be sent to an

相关标签:
4条回答
  • 2021-01-01 10:16

    The .btn classes are designed for , or elements (though some browsers may apply a slightly different rendering).

    If you’re using .btn classes on elements that are used to trigger functionality ex. collapsing content, these links should be given a role="button" to adequately communicate their meaning to assistive technologies such as screen readers. I hope this help.

    0 讨论(0)
  • 2021-01-01 10:21
    • If you put type=submit it is a Submit Button
    • if you put type=button it is just a button, It does not submit your form inputs.

    and also you don't want to use both of these

    0 讨论(0)
  • 2021-01-01 10:24

    Replace this

     <button type="button" value=" Send" class="btn btn-success" type="submit" id="submit">
    

    with

    <button  value=" Send" class="btn btn-success" type="submit" id="submit">
    
    0 讨论(0)
  • 2021-01-01 10:28

    Your problem is this

    <button type="button" value=" Send" class="btn btn-success" type="submit" id="submit" />
    

    You've set the type twice. Your browser is only accepting the first, which is "button".

    <button type="submit" value=" Send" class="btn btn-success" id="submit" />
    
    0 讨论(0)
提交回复
热议问题