Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在IE6中显示和隐藏表格_Javascript_Html_Css - Fatal编程技术网

Javascript 在IE6中显示和隐藏表格

Javascript 在IE6中显示和隐藏表格,javascript,html,css,Javascript,Html,Css,嗨,我正在使用IE6浏览器。我想在一定条件下展示和隐藏。我已经尝试使用下面的代码来显示和隐藏表 document.getElementById("crCurrSlotTbl").style.display="table" //show the table document.getElementById("crCurrSlotTbl").style.display="none"; //hide the table 但它在IE8中工作得很好,但在IE6中工作得不好。我尝试过各种解决方案,比如将

嗨,我正在使用IE6浏览器。我想在一定条件下展示和隐藏。我已经尝试使用下面的代码来显示和隐藏表

 document.getElementById("crCurrSlotTbl").style.display="table" //show the table
 document.getElementById("crCurrSlotTbl").style.display="none"; //hide the table
但它在IE8中工作得很好,但在IE6中工作得不好。我尝试过各种解决方案,比如将其包装在div标签上,但都不起作用

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

试试这个

从Microsoft Internet Explorer 5开始,明确支持
内联

document.getElementById("crCurrSlotTbl").style.display="block"; 
参考:

试试这个 步骤1:声明类不显示。在此情况下,声明样式显示为无。 步骤2:当您需要显示元素时

//remove class 

document.getElementById("whatever").className = "";
当你需要隐藏的时候

//add class

document.getElementById("whatever").className = "no-display";
使用直接显示隐藏

document.getElementById("crCurrSlotTbl").show() //show the table
 document.getElementById("crCurrSlotTbl").hide(); //hide the table

你在使用jquery吗?不,我们没有使用jquery,我们使用的是普通的javascriptOMG!仍然支持IE6show()和hide()javascript中用于显示或隐藏的预定义函数。您是否可以提供任何参考链接访问查看您获得的控制台错误:
未捕获类型错误:未定义不是一个函数
,它的函数似乎与
对话框
元素相关,该元素仅在
Chrome Canary
Safari 6中受支持。
@Kshitiz:document.getElementById(“任意”).className=“无显示”;这是什么身份证?对吗?你需要给的是选择。先在简单的文本字段上尝试一下,这样你就会很容易理解。您是否声明没有显示类?无法理解兄弟:(