Created
August 9, 2016 18:07
-
-
Save shortland/c6f2ecfe052b15c2a6a4f87d9e0ce24b to your computer and use it in GitHub Desktop.
Remove URL from alert box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <iframe id="myIframe"></iframe> | |
| <script> | |
| var ifrm = document.getElementById('myIframe'); | |
| ifrm = ifrm.contentWindow || ifrm.contentDocument.document || ifrm.contentDocument; | |
| ifrm.document.open(); | |
| ifrm.document.write('<script>alert("hello world");<\/script>'); | |
| ifrm.document.close(); | |
| </script> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Normal alert(); boxes show the page URL at the top; you can 'bypass/remove' this url by writing a native iframe and writing javascript directly to it.