Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>My Iframe</title>
- </head>
- <body>
- <button>iframe</button>
- <script type="text/javascript">
- document.querySelector('button').onclick = function () {
- parent.postMessage("myevent", "*")
- };
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment