JS
Run
<!DOCTYPE html>
<html lang="en">
<head>
	<title>Get current URL in JavaScript</title>
</head>
<body>
    <script>
    function getURL() {
        alert("The URL of this page is: " + window.location.href);
    }
    </script>
     
    <button type="button" onclick="getURL();">Click Here</button>
</body>
</html>