SQL PHP HTML ASP JavaScript articles and free scripts to download
 

document.URL of a page

The full URL of the page can be collected by using document object in JavaScript. The URL property of the document object returns the full path or the page url along with the domain name. Here is the syntax


document.URL


Note that the above line is case sensitive so we can't change the case of the above command.

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>





Further readings
referrer: Getting the referrer of the browser to know how the visitor has arrived
title: Managing the title of the page
url: Collecting the full script path or URL by document object
lastModified: Last Modified date & time of the file or page
domain: domain name of the URL or site using this script
write: sening output text to browser by using document.write




Join Our Email List
Email:  
For Email Newsletters you can trust
Document Object