您好,我使用的是 IE6 浏览器。我想在某些条件下显示和隐藏。我尝试使用下面的代码来显示和隐藏表格
document.getElementById("crCurrSlotTbl").style.display="table" //show the table
document.getElementById("crCurrSlotTbl").style.display="none"; //hide the table
但它在 IE8 中运行良好,但在 IE6 中运行不正常。我已经尝试了各种解决方案,例如将它包裹在 div 标签周围,但它们都不起作用。
谁能帮我解决这个问题?这个问题有什么解决方法吗?
最佳答案
试试这个,
block
和 inline
值在 Microsoft Internet Explorer 5 中得到明确支持。
document.getElementById("crCurrSlotTbl").style.display="block";
引用:http://msdn.microsoft.com/en-us/library/ie/ms530751%28v=vs.85%29.aspx
关于javascript - 在 IE6 中显示和隐藏表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23488508/