开发者

iframe not disappearing

I have an iframe:

parent.document.getElementById("IFRAMENAME").style.display = 开发者_如何学JAVA"none";

What would cause this code not to work? If i set the width to 0px it hides it. I debugged to make sure all the values of the frame are coming back.

I am using ie 7


IFRAMENAME suggests you use the name of the IFrame. That is not right. You should use the id as specified in the id attribute.

<iframe name="notthisone" id="butthisone" src="whatever.htm"></iframe>


Is your stylesheet overriding this assignment?

If you have:

 iframe#IFRAMENAME {display:block !important}

or something similar, it could supercede that code.

Also, does the code work in, say, other browsers?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜