Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <p>Click the button to open a new browser window.</p>
- <button onclick="myFunction()">Try it</button>
- <button onclick="closeFunction()">Close</button>
- <script>
- function myFunction() {
- myWindow = window.open("https://www.google.com");
- }
- function closeFunction() {
- myWindow.close();
- }
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment