Answers for "javascript get target data attribute"

3

event target data atributes

event.target.getAttribute("data-sortorder");
Posted by: Guest on October-15-2020
6

get data attribute javascript

// <div id="element" data-name="john"></div>

const el = document.querySelector('#element')
el.dataset.name // 'john'
Posted by: Guest on November-02-2020

Code answers related to "javascript get target data attribute"

Code answers related to "Javascript"

Browse Popular Code Answers by Language