JSFiddle - React, Tailwind, and code Playground
HTML
<p><a href="http://www.w3schools.com" id="w3s">W3Schools.com</a>
</p>
<button>Show href Value</button>
JavaScript
/* jquery get content attr method
The jQuery attr() method is used to get attribute values.
*/
$("button").click(function () {
alert($("#w3s").attr("href"));
});