-1
如果文本字段为空,我需要创建jQuery验证表单,然后发出警告。如何使用jQuery验证表单?
这是我的代码:
<form action="" method="POST">
<input type="checkbox" name="dropshiper_ceck" id="id_dropshiper_ceck">
<label><b><?php echo $text_dropship; ?></b></label>
<div class="" id="id_dropshiper_form" name="dropshiper_form">
<hr/>
<p>
<?php echo $text_dropship_name; ?>
</p>
<input type="text" name="nama_dropshiper" style="width: 97%" placeholder="<?php echo $text_add_name_dropshiper; ?>" id="id_nama_dropshiper" value="">
<br/>
<br/>
<p>
<?php echo $text_dropship_telp; ?>
</p>
<input type="text" name="nomor_telp" style="width: 97%" placeholder="<?php echo $text_add_number_phone_dropshiper; ?>" id="id_nomor_telepon_dropshiper" value="">
</div>
</form>
参考这个 - http://stackoverflow.com/questions/12437339/how-to-check-if-the-any-of-my-textbox-is-empty-or-not-in-javascript –
可能的重复[使用jQuery检查输入是否为空](http://stackoverflow.com/questions/1854556/check-if-inputs-are-empty-using-jquery) – Darshak