JSFiddle - React, Tailwind, and code Playground

by Matt Tyson

HTML

<form name="myform" action="" method="GET">
Enter something in the box: <br>
<input type="text" name="inputbox" value="" />
<input type="button" name="button" value="Click" onClick="testResults(this.form)" />
</form>

JavaScript

function testResults (form) {
    var inputValue = form.inputbox.value;
    alert ("You typed: " + inputValue);
}