JSFiddle - React, Tailwind, and code Playground
by hackdawg
HTML
<span id="search">entry</span>
<a id="dictionary">link</a>
<input type="button" onclick="clicks()" value="CLICK Me">
<script>
function clicks(){
var foo = document.getElementById("dictionary").id
$("a").attr("href", "http://example.com/"+foo+"?q=")
}
</script>