1. Home
  2. Javascript
  3. Get attribute

Get a value of the selected data attribute.

#javascript#select#attribute
element.getAttribute('data-attribute');
copy
Full Javascript cheatsheet