JSFiddle - React, Tailwind, and code Playground
HTML
<form onsubmit="return checkForm()">
Password: <input type="text" name="pwd">
<input type="submit" value="Submit">
</form>
JavaScript
function checkForm(){
var form = document.forms[0];
var selectElement = form.querySelector('input[name="pwd"]');
console.log();
}