CodePudding user response:
[... document. QuerySelectorAll (" input [type=checkbox] ")], forEach (item=& gt; {
Item. AddEventListener (" change ", ()=& gt; {
If (item. Checked) alert (item. ParentNode. ParentNode. QuerySelector (" input ^=scoreCq [id] "). The value)
}, false)
})