please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

String.anchor() Method

Name

String.anchor() Method---add an HTML anchor to a string

Availability

Navigator 2.0, Internet Explorer 3.0

Synopsis

string.anchor(name)

Arguments

name

The value of the NAME attribute of the HTML <A> tag, i.e., the name of the anchor to be created.

Returns

A copy of string, enclosed within <A NAME="name"> and </A> HTML tags.

Description

String.anchor() returns a copy of the string for which it is called, surrounded by <A> and </A> HTML tags. The NAME attribute of the <A> tag is set to the name argument. If the resulting string is appended to an HTML document (with Document.write() for example), it defines an anchor, with a name of name, which can be the target of a hypertext link.

Example

The following two JavaScript fragments evaluate to identical strings:

'Chapter 1: Introduction'.anchor('ch01');'
'<A NAME="ch01">Chapter 1: Introduction</A>'

See Also

"String", "String.link()"


Previous Home Next
String Book Index String.big()

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

file: /Techref/language/java/script/definitive/refp_355.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/12/27 06:08,
TOP NEW HELP FIND: 
3.144.227.3: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://massmind.org/techref/language/java/script/definitive/refp_355.htm"> [Chapter 21] Reference: String.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 massmind.org!

 

Welcome to massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .