JavaScript Basics
JavaScript Objects
JavaScript Advanced
JS Useful References
JS Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Javascript String - link() Method
Description:
This method creates an HTML hypertext link that requests another URL.
Syntax:
Here is the detail of parameters:
Return Value:
Example:
<html>
<head>
<title>JavaScript String link() Method</title>
</head>
<body>
<script type="text/javascript">
var str = new String("Hello world");
var URL = "http://www.tutorialspoint.com";
alert(str.link( URL ));
</script>
</body>
</html>
|
This will produce following result:
<a href="http://www.tutorialspoint.com">Hello world</a>
|
To understand it in better way you can Try it yourself.
|
|
|