JavaScript link() Method
JavaScript String object
Definition and Usage
The link() method is used to display a string as a hyperlink.
This method returns the string with an tag added, as shown below:
Syntax
string
.link(url)
| Parameters | Description |
|---|---|
| url | Required. The URL to link to |
Browser support





All major browsers support the link() method.
Example
Example
Display the string "Free Web Building Tutorials!" as a link:
Try it »
JavaScript String object