You can use the querySelectorAll()
method to select all elements with cb
in their name
attribute using a CSS attribute selector.
index.tsx60 chars2 lines
This will select all elements that have the attribute name
containing the substring cb
. The *=
operator is used to match substring.
You can then loop through the elements
NodeList and do whatever you need with them.
index.tsx70 chars4 lines
gistlibby LogSnag