ILIAS ILIAS - 2 years ago 133
Javascript Question

getElementsByClassName() with two classes

Is it possible to get all classes with name="a" or name="b" by using

only once?. I'd prefer vanilla Java-script.

Answer Source

You can't do it with getElementsByClassName() instead use querySelectorAll()

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download