比如input控件。Text1,可以使用Text1.style["display"]="none"来单独控制Text1的style属性中的display属性的值。不要写成Text1.style.value="display:none";因为这样的话,会把整个style的值设成display:none,原来style中设定的其他值,比如width:...等等就都不存在了。这样会引起格式的变化。
转载于:https://www.cnblogs.com/maverick9390/archive/2007/12/21/1008631.html