Navigator 2.0; enhanced in Navigator 3.0
document.URL
URL is a read-only string property that contains the complete URL of the current document.
document.URL is usually equal to window.location.href for the window that contains document. These two are not always equal, however, because the Document.URL property may be modified through URL redirection--Window.location contains the requested URL, and Document.URL specifies the actual URL where it was found.
The Document.location property is a synonym for the Document.URL property. The URL property is the preferred one, because it is less likely to be confused with the Window object's location property. Note, however, that in Navigator 2.0, the URL property does not appear in for/in loops run over Document objects. Also, the URL property is not supported by Internet Explorer 3.0.
Some web authors like to include the URL of a document somewhere within the document, so that, for example, if the document is cut-and-pasted to a file, or printed out, there will still be a reference to where it can be found online. The following script, when appended to a document will automatically add the document's URL. (Unfortunately, in Netscape 2.0, text such as this generated by JavaScript won't appear in printouts, which defeats an important purpose of including the location in the first place.)
<script> document.write('<P><HR><SMALL><I>URL: ' + document.URL + '</I></SMALL>'); </script>
"Document", "Document.lastModified", "Document.location", "Document.referrer", "Document.title", "Location", "Window.location"
file: /Techref/language/java/script/definitive/refp_93.htm, 5KB, , updated: 2019/10/14 16:00, local time: 2024/8/23 20:21,
18.217.53.223:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://piclist.com/tecHREF/language/java/script/definitive/refp_93.htm"> [Chapter 21] Reference: Document.URL</A> |
Did you find what you needed? |
![]() o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232! |
.