Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <script>
- function del() {
- var ask = window.confirm("Are you sure you want to delete this post?");
- if (ask) {
- window.alert("This post was successfully deleted.");
- // Sets the location of the topmost window of the current window.
- top.location = "http://www.example.com";
- }
- }
- </script>
- <body>
- <a href="" onclick="del()">delete</a>
- The content of the body element is displayed in your browser.
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement