Two radio buttons share one “id”?

后端 未结 8 2299
别那么骄傲
别那么骄傲 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:32

    Do not repeat id's.It is best practice to use only one id per page as it must be unique.You can group the radio buttons using name attribute.

    use $('input[name=interview]') to get the value.

提交回复
热议问题