In vanilla JavaScript, we can use wildcard (*) to match multiple elements (nodes) in the HTML DOM object. We can also match elements with attribute starting with, ending with or contains certain values.
For example, the following selectors will
- [name^="password"] will match all elements with name starting with password.
- [name$="password"] will match all elements with name ending with password.
- [name*="password"] will match all elements with name containing password.