Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>The Window Location Object</h1>
<h2>The pathname Property</h2>
<p id="demo"></p>
<script>
let path = location.pathname;
document.getElementById("demo").innerHTML = path;
</script>
</body>
</html>