How to Hide iFrames in JavaScript
- 1). Right-click the HTML file you want to edit. Click "Open With," then double-click the HTML editor you use for JavaScript code changes.
- 2). Create JavaScript "script" opening and closing tags. Type the following code anywhere within the HTML body:
<script type="text/javascript"> </script> - 3). Type the following JavaScript code within the "script" tags you created earlier:
document.getElementById("iframe").style.visibility= "hidden";
Replace "iframe" with the name of the iframe on your HTML page. - 4). Click the "Save" button and open the new code in any Web browser installed on your computer. Notice the iframe is hidden from user view.
Source...