HTML DOM height Property
Complete Image Object Reference
Definition and Usage
The height property sets or returns the height of an image.
Syntax
imageObject.height=pixels
|
Example
<html>
<head>
<script type="text/javascript">
function changeSize()
{
document.getElementById("compman").height="250"
document.getElementById("compman").width="300"
}
</script>
</head>
<body>
<img id="compman" src="compman.gif" width="107" height="98" />
<br /><br />
<input type="button" onclick="changeSize()"
value="Change size of image">
</body>
</html>
|
Try-It-Yourself Demos
Change the height and width of an image
Complete Image Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|