您现在的位置是:首页 > 电脑技术查询 > web开发

请教怎么不显示一个button

编辑:chaxungu时间:2022-10-02 23:22:44分类:web开发

请问如何不显示一个button?
<input type= "button " name= "button1 " >
现在不想显示这个button,就是说,不想在屏幕上看到,请问如何实现呢?
是不是必须要把这个button放到一个div里面,再通过控制div的不显示,来实现呢?

谢谢大家阿。


------解决方案--------------------
<input type= "button " name= "button1 " style= "display:none ">
------解决方案--------------------
style= "display:none "
------解决方案--------------------
<input type= "button " name= "button1 " style= "width:1px;height:1px " onclick=alert( "sdfsdf ")>