js中如何设置按钮的大小

各位前辈帮帮小弟吧!!!!

一般html的按钮大小?
这很简单的
修改style属性啊
<input type="button" value="删除" style="width:100px;height:50px">
温馨提示:答案为网友推荐,仅供参考
第1个回答  2018-03-04

用DOM的Style操作:

var a = document.getElementById('a');//id=a的元素
a.style.height = "";//高度
a.style.width = "";//宽度

第2个回答  2018-03-05
你修改它的尺寸,就不应该是在js文件里面改,应该在css文件里面改。。
第3个回答  2019-05-10
一般html的按钮大小?
这很简单的
修改style属性啊
<input
type="button"
value="删除"
style="width:100px;height:50px">
第4个回答  2015-04-06
<button></button>?
<input /> ?
CSS样式啊
相似回答