Pages

Javascript String - link() Method

Description:

This method creates an HTML hypertext link that requests another URL.

Syntax:

string.link( hrefname )
Here is the detail of parameters:
  • hrefname: Any string that specifies the HREF of the A tag; it should be a valid URL.

Return Value:

  • Returns the string with <a> tag.

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.remotetutor.blogspot.com";

alert(str.link( URL ));

</script>
</body>
</html>
This will produce following result:
<a href="http://www.remotetutor.blogspot.com">Hello world</a>
 
 +JavaScript +JavaScript Frameworks Links +Javascript Development 
+JavaScript's and More, Software and Marketing +JavascriptU +JavaScriptOn 
+Javascript Problems +JavaScriptOn 
 +javaScript is a creek in West Virginia in the summe  

No comments:

Flag Counter
| Copyright © 2013 Remote Tutor