JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" value="Hello">
JavaScript
var input = document.getElementsByTagName("input")[0];
if (input.value != ""){
alert("Input is not empty");
}
<input type="text" value="Hello">
var input = document.getElementsByTagName("input")[0];
if (input.value != ""){
alert("Input is not empty");
}