html-控件的隐藏
html属性设置 input的两种方式 type=“hidden” style=“display: none;”
1
2
| <input type="hidden" value="" name="Ie_txt" id="Ie_txt">
<input type="text" style="display: none;" value="275" name="task_id" class="span3">
|
通过js脚本设置
1
2
3
4
5
6
7
8
9
10
11
12
| <input type="button" value="隐藏" onclick="csan(did,'none')">
<input type="button" value="显示" onclick="csan(did,'')">
<input id="did">
<br>
<input type="button" value="隐藏" onclick="csan(dis,'none')">
<input type="button" value="显示" onclick="csan(dis,'')">
<input id="dis">
<script>
function csan(obj,sta){
eval("obj.style.display=\""+sta+"\"");
}
</script>
|