Just as a Link object represents a hypertext link, an Anchor object represents a named location within a document which can serve as the target of a hypertext link. Anchors are something like the reverse of Links, and they are treated similarly to Links in HTML and in JavaScript. An anchor is created with the <A> tag, when it is used with the NAME attribute (rather than the HREF attribute, which creates a link). The Document object contains an anchors[] property which is an array of all the Anchors in the document.
There is only one flaw in this analogy between links and anchors: the Anchor object has not been implemented in either JavaScript 1.0 or JavaScript 1.1. So, in Navigator 2.0, Navigator 3.0, and Internet Explorer 3.0, the anchors[] property of the Document object is an array that contains null for each of its elements. The length property of the anchors[] array does work, and you can use it to determine the number of anchors in a given document, although this information may not be of particular use.
The next version of JavaScript will likely contain a useful implementation of the Anchor object.
file: /Techref/language/java/script/definitive/ch14_03.htm, 4KB, , updated: 2019/10/14 16:00, local time: 2024/8/22 04:16,
3.146.105.57: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/ch14_03.htm"> [Chapter 14] 14.3 The Anchor Object</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. |
Welcome to piclist.com! |
.