Does a name attribute have to be unique in a HTML document?

后端 未结 3 907
一生所求
一生所求 2020-11-28 11:53

I remember reading in the spec once that both the id attribute and the name attribute share the same namespace and have to be unique. Henceforth I\

3条回答
  •  失恋的感觉
    2020-11-28 12:22

    ID should be unique but you can use multiple form elements with the same NAME. This is standard for how radio buttons work so you can force one seletion of a radio button group.

提交回复
热议问题