1. Home
  2. Javascript
  3. Set attribute
#javascript#select#attribute

Set the value of the targeted data attribute.

element.setAttribute('attribute','value');
copy
Full Javascript cheatsheet
Sitemap Git repository