How to append hyperlink to Body tag using JQuery?

In the previous example, we have seen how to append href attribute to hyperlink tag. Now I am giving example for, how to create a total hyperlink using JQuery only...
<html>
<head>
    <title></title>
</head>
<body>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script>
jQuery('<a>http://aspnettutorialonline.blogspot.com/</a>').attr('href', 'http://www.jquery.com').appendTo('body');
    </script>
</body>
</html>
For more interview Questions Please see JQuery Interview Questions.
Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

 
Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar