javascript
how to select data attribute in javascript
How to Select Data Attribute in JavaScript You might have come across situations where you need to select an element based on its data attribute. In JavaScript, it is very easy to select elements with data attributes. Here are some ways to do that. Using the querySelector() Method The querySelector(