跨浏览器的IFrame设置为“about:blank”? [英] Cross browser way of setting IFrame to "about:blank"?
本文介绍了跨浏览器的IFrame设置为“about:blank”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在所有浏览器中,about:blank是否被识别为没有错误?
给iframe一个空的src有效吗?
解决方案
src =javascript:;
或
src =javascript:void(0)
Firefox
Does anybody know a proper, cross-browser way to "empty" an IFrame? Is "about:blank" recognized without error across all browsers? Is it valid to give an IFrame an empty src?
解决方案
How about
src="javascript: ;"
or
src="javascript:void(0)"
This should work fine with IE and Firefox
这篇关于跨浏览器的IFrame设置为“about:blank”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文