Полезная информация

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

String.link() Method

Name

String.link() Method---add a hypertext link to a string

Availability

Navigator 2.0, Internet Explorer 3.0

Synopsis

string.link(href)

Arguments

href

The URL target of the hypertext link that is to be added to the string. This string argument specifies the value of the HREF attribute of the <A> HTML tag.

Returns

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

Example

The following two JavaScript fragments evaluate to identical strings:

'Section 1-1'.link('ch01#sect1')
'<A HREF="ch01#sect1">Section 1-1</A>'

See Also

"String", "String.anchor()"


Previous Home Next
String.length Book Index String.prototype

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