I need show selection id by js, by this code only show 1 and first select id
my code is this html and javascript
4条回答 离开以前 (楼主) 2021-01-26 05:59 The id attribute should be unique within the page otherwise only the first one gets selected(using id selector), for a group of elements use a common class instead and within the change event handler use this to refer the clicked element. 1 2 1 2 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
The id attribute should be unique within the page otherwise only the first one gets selected(using id selector), for a group of elements use a common class instead and within the change event handler use this to refer the clicked element.
id
this
1 2 1 2