Tryit Editor v1.4

<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 height and width of image"> </body> </html> | Your Result:
Edit the code above and click to see the result. | W3Schools.com - Try it yourself