FocusOut

show alert if value is blank

by Prasad Gavande

HTML

feild1:
<input type="text" id="xyz"> feild2:
<input type="text" id="abc">

JavaScript

$("document").ready(function() {
  $("#xyz").focusout(function() {
    if ($("#xyz").val() == "") {
      alert("arrr");
    } else {
      alert("maho");
    }

  });
});