document.URL of a page
document.write(document.URL);
Output is here
Note that the above line is case sensitive.
Using window object.
document.write(window.location.href);
Output is here
The URL property of the document object returns the full path or the page url along with the domain name.
Let us try to display a sample code to use document.URL property.
<html>
<head>
<title></title>
<script type="text/javascript">
document.write(document.URL);
</script>
</head>
<body>
</body>
</html>
← document Object Last Modified date of the page →
← Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
plus2net.com