jquery Проверяем что форма пуста (checkbox, input, radio, textarea)
Primary tabs
$(":input").each(function() {
if($(this).val() === "") {
console.log("Empty Fields!!");
} else {
console.log("clear");
}
});
А лучше используйте более тонко настраиваемый плагин isInputsEmpty() из набора: https://github.com/it-for-free/jquery-useful-tools
- Log in to post comments
- 2292 reads