document.URL
JavaScript 1.1+, JScript1.0+ Nav3+, IE3+, Opera3+ Syntax
document.URL
Description
The URL property specifies the URL of the document. This property is read-only.
Example
Listing 7.197 uses the URL property to write the document's URL to the screen.
Listing 7.197 Accessing a Document's URL Property
<html> <script> <!-- Hide //Output the URL of the document document.write("The URL of this page is -->",document.URL); //Hide End ---> </script> </html> |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.