1. Home
  2. ›
  3. Javascript
  4. ›
  5. Get attribute

Get a value of the selected data attribute.

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