Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title></title>
- </head>
- <body>
- <button id="foo" onclick="action('http://stackoverflow.com/q/36933820/5526354')">Click 1</button>
- <button id="foo" onclick="action('http://stackoverflow.com/a/36934160/5526354')">Click 2</button>
- <button id="foo" onclick="action('http://stackoverflow.com')">Click 3</button>
- <script type="text/javascript">
- function action(arg){
- window.location.replace(arg)
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement