HTML DOM URLProperty
Document Object
Definition and Usage
The URL property returns the URL of the current document.
Syntax
document.URL
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the URL property
Examples
Examples
Return the full URL of the current document:
<html>
<body>
The full URL of the document:
<script>
document.write(document.URL);
</script>
</body>
</html>
<body>
The full URL of the document:
<script>
document.write(document.URL);
</script>
</body>
</html>
Try it yourself »
Document Object Other extensions