Javascript examples for Browser Object Model:Location
Get the page URL for button using window.location.href
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> /* w w w .j ava2 s . com*/ <body> <button onclick="document.write(window.location.href)">Button</button> </body> </html>