-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