Hi
how to get html link text on click ? Please help
<a href="sample.aspx" >text</a>
I want to get name of <a> tag on click.
Hi suhaas121,
Refer below code.
HTML
<a href="#">ASPSnippets</a> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="text/javascript"> $(function () { $('a').click(function () { alert($(this).html()); }); }); </script>
Demo
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.