please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Anchor Object

Name

Anchor Object---the target of a hypertext link

Availability

Implemented but nonfunctional in Navigator 2.0, 3.0, and Internet Explorer 3.0

Synopsis

document.anchors.length
document.anchors[i]

HTML Syntax

An Anchor object is created by any standard HTML <A> tag that contains a <NAME> attribute:

<A
  NAME="anchor_name"  links may refer to this anchor by this name
  [ HREF=URL ]    an anchor may also be a link
  [ TARGET="window_name" ]    links may refer to other windows
>
link text
</A>

Description

An "anchor" is a named location within an HTML document. Anchors are created with the NAME attribute of the <A> tag. The JavaScript Document object has an anchors[] array property that should contain references to each of the anchors in the document. Unfortunately, in Navigator 2.0 and 3.0 and in Internet Explorer 3.0, the elements of this array always contain null. The problem is that the Anchor object has not yet been implemented. A future version of the language should contain an actual working Anchor object, and the anchors[] array will be filled in with references to appropriate Anchor objects.

Note that the <A> tag used to create anchors is also used to create hypertext links. Although hypertext links are often called "anchors" in HTML parlance, they are represented in JavaScript with the Link object, not with the Anchor object.

See Also

"Document.anchors[]", "Link"


Previous Home Next
alert() Book Index Applet

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell

file: /Techref/language/JAVA/script/definitive/refp_06.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/12/4 17:38,
TOP NEW HELP FIND: 
3.22.241.21: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?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://sxlist.com/Techref/language/JAVA/script/definitive/refp_06.htm"> [Chapter 21] Reference: Anchor</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .