get dom property javascript 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"