JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" value="Numbers!" onclick="rand()"/>
<input id="field" type="text" placeholder="Press the button!"/>
JavaScript
function rand(){
var field = document.getElementById("field");
var randy = Math.floor(Math.random()*200)+1);
field.value = randy;
}