get value from html using class name java script code example Example: javascript get class name document.getElementById("myDIV").className = "mystyle";