JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#" type="button" OnClick="myf=myfunc(1234);document.write(myf)" value="clickme">clickme</a> or  <a href="#" type="button" OnClick="myf=myfunc(1234);document.getElementById('other').value=myf;" value="clickme">ClickMeAlso</a>
<input id='other' type='text'/>

JavaScript

function myfunc(a) {

    return a + " howdy";
};