how to get any property of element in HTML using javascript code example Example: dom element get attribute document.getElementById('id1').getAttribute('attribute');