“javascript:”,“#”和“javascript:false”之间的区别是什么?在iframe.src属性中 [英] What is the difference between "javascript:", "#", and "javascript:false" in iframe.src attribute

查看:112
本文介绍了“javascript:”,“#”和“javascript:false”之间的区别是什么?在iframe.src属性中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想使用这3个值来设置iframe的 src 。我发现:

If I want to set the src of iframe with these 3 value. I found:


  1. javascript:在IE10中无法正常工作找不到页面)。其他主流浏览器或IE9是确定。

  2. javascript:false 将显示 false string可以。

  3. li>
  1. javascript: doesn't work in IE10 (error is can't find the page). other mainstream browsers or IE9 is ok.
  2. javascript:false will show a false string in the iframe for IE10, others browsers or IE9 is ok.
  3. # 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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆