JSFiddle - React, Tailwind, and code Playground

by Giorgio Malvone

HTML

<input type="button" onclick="randomURL()" value="Generate"></input>
<input placeholder="Press the button!" id="textField" type="text"></input>

JavaScript

function randomURL() {
    var randy = Math.floor(Math.random()*1000)+1;
    var textField = document.getElementById("textField");
	textField.value = randy;
    

}