access element javascript attribute code example
Example: get element attribute javascript
var x = document.getElementsByTagName("H1")[0].getAttribute("class");
var x = document.getElementsByTagName("H1")[0].getAttribute("class");