From http://www.w3schools.com (Copyright Refsnes Data)

JavaScript anchor() Method


String Object Reference JavaScript String Object

Definition and Usage

The anchor() method is used to create an HTML anchor.

Syntax

stringObject.anchor(anchorname)

Parameter Description
anchorname Required. Defines a name for the anchor


Example

Example

Add an anchor to a text:

<script type="text/javascript">

var txt="Hello world!";
txt.anchor("myanchor");
alert(txt.anchor("myanchor"));

</script>

Try it yourself »


String Object Reference JavaScript String Object

From http://www.w3schools.com (Copyright Refsnes Data)