If I want to set the src
of iframe with these 3 value. I found:
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?
Try using
about:blank
as the URL. This should display a blank page in all browsers.http://tools.ietf.org/html/rfc6694#section-3
If you want an
iframe
that doesn't load anything right away, then just don't set thesrc
attribute to anything. You can set the.src
property later via Javascript to cause it to load something.