how to get the HTML class name javascript code example Example: javascript get class name document.getElementById("myDIV").className = "mystyle";