有什么方法可以删除标签或者达到不让隐藏标签占位的效果么?
我有两个button
<input id='b1' type='button' value='b1'/><br/>
<input id='b2' type='button' value='b2'/>
如果
document.getElementById('b1').style.display='none';
b1不见了,但是他原来的位置变成了空白,怎么能够让b1消失,让b2占到他原来的位置?
我有两个button
<input id='b1' type='button' value='b1'/><br/>
<input id='b2' type='button' value='b2'/>
如果
document.getElementById('b1').style.display='none';
b1不见了,但是他原来的位置变成了空白,怎么能够让b1消失,让b2占到他原来的位置?
document.getElementById('b1').style.visibility='hidden';
把<input id='b1' type='button' value='b1'/><br/>改成
<span id='b1'><input type='button' value='b1'/><br/></span>
就可以了
<input id='b2' type='button' value='b2'/> <script>
window.onload=function(){
d1.style.display='none'
}
</script>