Remove Links From HTML HyperLink using jQuery

Remove Links From HTML HyperLink using jQuery

Here i am giving you a sample example to remove links from HTML hyperlink control and display only text of that link.

Example :

Supppose we have some links in our html page like below :

<a href="">Google</a><br>
<a href="">DotNetSquare</a>

Now we want to remove all these links and display only Text like :

Here is the code to do this :

Code :

<html xmlns="">
<title>Remove Links From HTML HyperLink Controls</title>
<script src="" type="text/javascript">
<script type="text/javascript">
$(function() {
$('#btnRemoveLink').click(function() {
Links : <br />
<a href="">Google</a><br>
<a href="">DotNetSquare</a><br><br>
<input id="btnRemoveLink" type="button" value="Remove Links" />

Output :

Before :

After :

Thank You.


Article by Manoranjan Sahoo
If it helps you then Rate this. Best Regards, Manoranjan Sahoo Blog:

Follow Manoranjan Sahoo or read 63 articles authored by Manoranjan Sahoo

Related Articles

More articles: JQuery


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: