html css set height to width code example
Example 1: javascript set div height
document.getElementById("myBtn").style.height = "50px";
Example 2: javascript get image width and height
var img = new Image();
img.onload = function() {
alert(this.width + 'x' + this.height);
}
img.src = 'http://www.google.com/intl/en_ALL/images/logo.gif';