JSFiddle - React, Tailwind, and code Playground
by maremp
HTML
<input type="text" id="tb_login" />
<input type="password" id="tb_pwd" />
<button onclick="return log();">test</button>
JavaScript
function log() {
var x = document.getElementById("tb_login").value;
if (x == null || x.trim() == "") {
alert("please type login");
return false;
}
var z = document.getElementById("tb_pwd").value;
if (z == null || z.trim() == "") {
alert("please type pass");
return false;
}
}