javascript控制页面控件隐藏显示的两种方法,方法的不同之处在于控件隐藏后是否还在页面上占位

方法一:

document.all[“PanelSMS”].style.visibility=”hidden”; 
document.all[“PanelSMS”].style.visibility=”visible”;
 

方法二:

document.all[“PanelSMS”].style.display=”none”; 
document.all[“PanelSMS”].style.display=”inline”;

方法一隐藏后 页面的位置还被控件占用 只是不显示

方法二隐藏后 页面的位置不被占用

版权声明:本文为tengzhouboy原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/tengzhouboy/archive/2012/12/31/2840369.html