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