任何人都可以在JavaScript中为show()提供替代方法,支持ie11 s [在此处输入图像描述] [1] ince show / hide不支持它...
function displayPopUp(xPopUp,yPopUp,wPopUp,lPopUp,message)
{
showDivCache();
var oPopup=document.getElementById("popUpDiv");
oPopup.style.backgroundColor = "#D6D6D6";
oPopup.style.border = "solid black 3px";
oPopup.innerHTML = "<TABLE width='100%' height='100%'><TR valign='middle'><TD align='center'><B>"+message+"</B></TD></TR></TABLE>";
**oPopup.show(popUpX, popUpY, popUpW, popUpL, document.body);**
window.onfocus = redisplayPopUp;
var size=0;
var tabAllData=document.all;
if (tabAllData.document!=null)
size=document.all.length;
for (i = 0;i<size;i++)
{
fldObj = tabAllData[i];
fldObj.onfocus=redisplayPopUp;
}
return true;
答案 0 :(得分:0)
我不记得IE11的问题。你怎么能通过jquery以多种方式实现这一目标。
$('#id').toggle()
$('#id').fadeIn()
$('#id').fadeOut()
使用css
.hidden{
display: none;}
$('#id').addClass("hidden");
甚至
document.getElementById("id").style.visibility = "hidden";
//this one will remove the allocated space
document.getElementById("id").style.display = "none";