how to get value in attribute code example Example: dom element get attribute document.getElementById('id1').getAttribute('attribute');