JSFiddle - React, Tailwind, and code Playground

by dhizzybusy

HTML

<!DOCTYPE html>
<html>
<body>

<p>Click the button to get random last name.</p>
<input type="button" id="btnSearch" value="Pick One" onclick="GetValue();" />
<p id="message" ></p>

<script>
function GetValue()
{
	var lStudents = new Array	("Millett","Mondy","Pfeffer","Rosado","Santos","Silva","Stelle","Temarantz","Van","Vargas");

	var random = lStudents[Math.floor(Math.random() * lStudents.length)];

	document.getElementById("message").innerHTML=random;

}
</script>

</body>
</html>