Looking for javascript Answers? Try Ask4KnowledgeBase
Looking for javascript Keywords? Try Ask4Keywords

JavaScriptData attributes


Syntax

  • var x = HTMLElement.dataset.*;
  • HTMLElement.dataset.* = "value";

Remarks

MDN Documentation: Using data attributes.