我有一個表單,我正在驗證使用jQuery的驗證插件。我試圖做的是將錯誤顯示在一個單獨的稱爲「錯誤」的div可以讓任何人幫助我嗎?即時通訊使用jQuery驗證如何在單獨區域顯示錯誤
形式的代碼是在這裏:
<form name="contactform" id="contactform" method="post" action="/contactform/send_form_email.php">
<label for="your_name">YOUR NAME</label>
<input type="text" name="your_name" id="your_name" class="fulltext"/>
<label for="type">TYPE OF EVENT</label>
<input type="text" name="type" id="type" class="fulltext"/>
<label for="guests">GUESTS</label>
<input type="text" name="guests" id="guests" class="shorttext"/>
<label for="date">DATE</label>
<input type="text" name="date" id="date" class="shorttext"/>
<label for="phone">PHONE</label>
<input type="text" name="phone" id="phone" class="shorttext"/>
<label for="email">ENTER EMAIL ADDRESS</label>
<input type="text" value="ENTER EMAIL ADDRESS" name="email" id="email" class="fulltext"/>
<button type="submit" value="submit">go</button>
</form>
和JavaScript是在這裏:
rules: {
email: { required: true, email: true, maxlength: 50 },
honeypot: { maxlength: 0 }
}
});
任何幫助,這將不勝感激。
謝謝。這裏提到的http://jquery.bassistance.de
的JavaScript代碼是不完整的。你的頭部被切斷。 – reporter
你使用了哪種jQuery驗證? http://www.google.fr/search?sourceid=chrome&ie=UTF-8&q=jquery+validation ^^ – Awea
我使用了http://bassistance.de/jquery-plugins/jquery-plugin-validation/ – macroj