grab attribute valuie from tag in JS code example
Example: javascript get attribute
//HTML
//
var elem = document.getElementById("elem");
elem.getAttribute("data-id"); // "4hJ3s"
//HTML
//
var elem = document.getElementById("elem");
elem.getAttribute("data-id"); // "4hJ3s"