javascript使控件无效或者隐藏的方法总结
颜德馨
2023-12-01
(1)css 或属性
visibility = "hidden";
visibility = "visible";
<input type="button" value="隐藏文本" οnclick="document.getElementById('p1').style.visibility='hidden'" />
<input type="button" value="显示文本" οnclick="document.getElementById('p1').style.visibility='visible'" />
(2)属性 disabled = "true"
(3)属性hidden = "hidden"
(4)display:block
(5)
$("#nameErrorTip").show();显示div
$("#nameErrorTip").hide();隐藏div