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.
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.
You could also do this:
$("#iframe").contents().find("body").html('');
tested in IE, Firefox and Chrome ... it did it :)
is a "URL" that is blank. It's always clear
You can set the page's source to that, and it will clear.