javascript - 在 IE6 中显示和隐藏表格

标签 javascript html css

您好,我使用的是 IE6 浏览器。我想在某些条件下显示和隐藏。我尝试使用下面的代码来显示和隐藏表格

 document.getElementById("crCurrSlotTbl").style.display="table" //show the table
 document.getElementById("crCurrSlotTbl").style.display="none"; //hide the table

但它在 IE8 中运行良好,但在 IE6 中运行不正常。我已经尝试了各种解决方案,例如将它包裹在 div 标签周围,但它们都不起作用。

谁能帮我解决这个问题?这个问题有什么解决方法吗?

最佳答案

试试这个,

blockinline 值在 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/

相关文章:

javascript - 同时使用hasOne和belongsTo有什么意义吗?

css - card-img-top 和 card-body 之间的边框

javascript - 如何在 Next JS Application 中将 String 转换为 HTML 元素?

javascript - SVG 文件脚本无法在 html 中运行

javascript - 如何使用 Easeljs 将 Click 事件添加到 spriteSheet?

jquery - 不同 Div 悬停时的 CSS3 动画触发器 (JQuery)

html - 移动 CSS 时框不会重新调整大小

javascript - 如何通过node判断用户的操作系统?

javascript - 阻止它滚动到页面顶部

javascript - 加速选择器和方法