<html> <head> <script type="text/javascript"> function showURL(){ alert(document.URL) } </script> </head> <body> <form> <input type="button" onclick="showURL()" value="Show URL"> </form> </body> </html>