Two radio buttons share one “id”?

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

    you must assign same name but different id to input type=radio because this is basic property of raido button that you need to select only one value from givel aal radio buttons.

    but that id should not be assigned to other form elements

提交回复
热议问题