我想用JavaScript让我的按钮更大。我怎么能这样做?
我试过了:
var signin = document.getElementById("signin");
signin.style.width = "400px";
但这不起作用。
答案 0 :(得分:0)
测试案例:它有效!
var enlarge = function(){
var signin = document.getElementById("signin");
signin.style.width = "400px";
}

<div>
<div><span>click to sign in</span>
</div>
<button id='signin' onclick='enlarge()'>Sign In</button>
</div>
&#13;