控制html控件的显示与隐藏


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

?<input type=”button” ? id = ‘ btn’ style=”display:none;”></input>

显示:document.getElementById(“btn”).style.display=”none”;

利用这样可做出折开隐藏的效果

display:

none 此元素不会被显示。
block 此元素将显示为块级元素,此元素前后会带有换行符。
inline 默认。此元素会被显示为内联元素,元素前后没有换行符。