if input is null javascript code example
Example 1: if input value is null do something
if(document.getElementById("question").value.length == 0)
{
alert("empty")
}
Example 2: hhow to check input is null in html using js
function required(inputtx)
{
if (inputtx.value.length == 0)
{
alert("message");
return false;
}
return true;
}