编辑下面的代码:【加编码】
<html> <head> <script> function changeSize() { document.getElementById("compman").height="250"; document.getElementById("compman").width="300"; } </script> </head> <body> <img id="compman" src="/demo/compman.gif" width="107" height="98"> <br><br> <input type="button" onclick="changeSize()" value="Change size of image"> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂