“javascript:”,“#”和“javascript:false”之间的区别是什么?在iframe.src属性中 [英] What is the difference between "javascript:", "#", and "javascript:false" in iframe.src attribute
本文介绍了“javascript:”,“#”和“javascript:false”之间的区别是什么?在iframe.src属性中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我想使用这3个值来设置iframe的 src
。我发现:
If I want to set the src
of iframe with these 3 value. I found:
-
javascript:
在IE10中无法正常工作找不到页面)。其他主流浏览器或IE9是确定。 -
javascript:false
将显示false $ c $对于IE10,其他浏览器或IE9的iframe中的c> string可以。
-
#
li>
javascript:
doesn't work in IE10 (error is can't find the page). other mainstream browsers or IE9 is ok.javascript:false
will show afalse
string in the iframe for IE10, others browsers or IE9 is ok.#
works fine in all the browsers.
它们之间有什么区别?
What is the difference between them? Which one is the best choice for cross-browser issues?
推荐答案
尝试使用 about:blank code>作为URL。
Try using about:blank
as the URL. This should display a blank page in all browsers.
http://tools.ietf.org/html/rfc6694#section-3
这篇关于“javascript:”,“#”和“javascript:false”之间的区别是什么?在iframe.src属性中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文