JSFiddle - React, Tailwind, and code Playground

HTML

<form onSubmit="return checkForm();">
<select id="grade" >
    <option value=""></option>
    <option value="A">A</option>
    <option value="B">B</option>
    </select>
</form>

JavaScript

function checkForm(){
    var e=document.getElementById("grade").value;//alert(e);
    if(e===""){
        alert("nothing selected");
        return false;
    }
}