Answers for "how to check if input text is empty in jquery"

1

jquery check if input is empty on submit

var empty = true;
$('input[type="text"]').each(function() {
   if ($(this).val() != "") {
      empty = false;
      return false;
   }
});
Posted by: Guest on March-10-2021
1

check textbox is empty in jquery

if ( $("#txt").val().length == 0 )
{
  // do something
}
Posted by: Guest on December-09-2021

Code answers related to "how to check if input text is empty in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language