How to clear the content of an IFRAME?

前端 未结 10 2408
感情败类
感情败类 2020-12-14 05:17

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 = \"bl

10条回答
  •  时光说笑
    2020-12-14 06:15

    about:blank
    

    is a "URL" that is blank. It's always clear

    You can set the page's source to that, and it will clear.

提交回复
热议问题