Using below program, we can able to give anchor tag text and link dynamically using JQuery.
If you have any queries or suggestions, please feel free to ask in comments section.
<!DOCTYPE> <html> <head> <title>How to assign anchor tag text and link to the </title> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> </head> <body> <!--Empty anchor tag --> <a></a> <!--This will change to <a href="http://www.jqueryexamplecode.blogspot.com">JQueryExampleCode</a>--> <script> $('a').text('JQueryExampleCode').attr('href', 'http://www.jqueryexamplecode.blogspot.com'); </script> </body> </html>
If you have any queries or suggestions, please feel free to ask in comments section.
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.