表行在Javascript中显示无在IE中不工作
我有一张桌子,如下所示:表行在Javascript中显示无在IE中不工作,javascript,html-table,Javascript,Html Table,我有一张桌子,如下所示: <table> <tr> ............ <td> <span><img id="icon_open_<%=rstloadmsg.getInt("uidmessage")%>" src="icon_plus.png" style="display:inline-block" alt="O" onclick="readmsg(<%=rst.getInt("id")%>)" >
<table>
<tr>
............
<td>
<span><img id="icon_open_<%=rstloadmsg.getInt("uidmessage")%>" src="icon_plus.png" style="display:inline-block" alt="O" onclick="readmsg(<%=rst.getInt("id")%>)" ></span>
..........
</table>
它在除IE之外的所有其他浏览器中都可以正常工作
在IE中,开放消息工作正常。但close不起作用。我试了很多。在其他浏览器中,当它达到警报(“1”)
时,它将关闭。在IE中,即使达到警报(“4”)代码>不知道为什么它不工作。请帮帮我。是因为我使用的是style.display=“table row”代码>。请帮帮我
注意IE版本:11.0.9600.16384
您能在这里复制生成的html吗?您可能有重复的ID或其他我们看不到的内容。可能会创建一个小提琴?尝试使用style.display=“
(空字符串而不是表行
)来显示表行,看看大多数值都来自数据库,我正在将它们填充到表中,就像填充表一样。这就是我没有创作小提琴的原因。希望你能理解。@skobaljic让我检查一下it@Santhucool你不能得到这样的帮助。。我们猜不出问题出在哪里。。即使动态生成数据,也可以在保留生成的DOM的同时创建虚拟数据
//Read message
function readmsg(msgid) {
document.getElementById("msg_body_" + msgid).style.display = "table-row";
document.getElementById("msg_reply_body_" + msgid).style.display = "none";
document.getElementById("icon_open_" + msgid).style.display = "none";
document.getElementById("icon_close_" + msgid).style.display = "inline-block";
}
//Close message
function closemsg(msgid) {
//window.alert(msgid);
document.getElementById("msg_body_" + msgid).style.display = "none";
//window.alert("1");
document.getElementById("msg_reply_body_" + msgid).style.display = "none";
//window.alert("2");
document.getElementById("icon_open_" + msgid).style.display = "inline-block";
//window.alert("3");
document.getElementById("icon_close_" + msgid).style.display = "none";
//window.alert("4");
}