编辑下面的代码:【加编码】
<html> <head> <script> function displayResult() { document.getElementById("b1").style.width="300px"; } </script> </head> <body> <input type="button" id="b1" onclick="displayResult()" value="Change width of button"> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂