如何清除IFRAME的内容? [英] How to clear the content of an IFRAME?
本文介绍了如何清除IFRAME的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何清除我的IFRAME元素的内容,使用javascript,而不加载空白页面?
我可以这样做: iframe_element.src =blank.html
,但必须有更好的即时方法。
解决方案
about:blank
是一个空白的URL。它总是很清楚
你可以设置页面的源代码,并且它会被清除。
How do I clear the content of my IFRAME element, using javascript, without loading a blank page into it?
I can figure out to do this: iframe_element.src = "blank.html"
, but there must be a better, instant, method.
解决方案
about:blank
is a "URL" that is blank. It's always clear
You can set the page's source to that, and it will clear.
这篇关于如何清除IFRAME的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文