JSFiddle - React, Tailwind, and code Playground
by Coddwrench
HTML
<input style = "margin-right: 8px;" type = "text" name = "con" id = "myfunction" required=''/>
<input type = "button" value = "Submit" class="next btn btn-primary" id = "buttonze" onclick = "validate()"/><br />
JavaScript
function validate() {
var value = document.getElementById("myfunction").value;
if (value.length == 5) {
window.location.href = "http://www.example.com";
} else {
return false;
}
}