how to change a element size in % in javascript code example Example: javascript set div height document.getElementById("myBtn").style.height = "50px";