set custom data attribute javascript code example
Example: how to can i get custom data attribute value in javascript
example <button data-keyname = "a'></button>
let variable = element.dataset.keyname;
or
let varibale = element.['keyname'];
or
let variable = element.getAttribute('data-keyname');