Latest

recent

JavaScript link() Method

Definition and Usage

The link() method is used to display a string as a hyperlink.

Syntax

stringObject.link(url)

Parameter Description
url Required. Specifies the URL to link to


Example

In this example "Free Web Tutorials!" will be displayed as a hyperlink:

<script type="text/javascript">
var str="Free online Tutorials!";
document.write(str.link("http://www.1000sourcecodes.com"));
</script>
JavaScript link() Method Reviewed by 1000sourcecodes on 02:03 Rating: 5
Powered by Blogger.