Two radio buttons share one “id”?

后端 未结 8 2164
别那么骄傲
别那么骄傲 2020-12-29 06:59

I\'m borrowing/adapting this simple html/javascript form set up to put some data in the database. The original code uses text fields in the form, but I\'m using radio button

相关标签:
8条回答
  • 2020-12-29 07:53

    No, an Id attribute should always be unique. If you're using jQuery (looks like you are), you can select it with $('input[name=interview]');.

    0 讨论(0)
  • Instead of id="nick"

    You can use name="nick"

    Or

    class="nick"
    
    0 讨论(0)
提交回复
热议问题