[Solved] Get link’s text in javascript December 11, 2022 by Kirat $(".myid").click(function (event) { // I want to prevent the elements default action (thanks @ Rajaprabhu Aravindasamy). event.preventDefault(); alert($(this).text()); }); JSFIDDLE. Read more about preventDefault here. 1 solved Get link’s text in javascript