我正在使用jQuery工具验证器来验证我网站上的表单,让它在Firefox,Chrome和IE中运行良好。我也在iPhone上测试了它,一切正常,直到我在iPad上测试它!
当您单击提交时,会出现错误工具提示,但它似乎位于页面顶部而不是相对于表单元素,就像在所有其他浏览器上一样!
我正在使用jQuery Tools 1.2.7的最新完整版
有没有人知道修复?
这是我的HTML ...
<form id="myform" action="/cgi-bin/mailer.pl" method="post">
<fieldset>
<h3>Enquire About This Holiday</h3>
<p>Please fill in the form below, items marked with a * require completing.</p>
<p>
<label><strong>Full Name *</strong></label>
<input name="name" id="name" type="text" required="required" class="full" pattern="[a-zA-Z ]{3,}" data-message="Error Please Complete" maxlength="30" autocomplete="off"/>
</p>
<p>
<label><strong>Telephone Number *</strong></label>
<input name="telephone" id="telephone" type="tel" class="full" autocomplete="off"/>
</p>
<p>
<label><strong>E-Mail Address *</strong></label>
<input name="email" id="email" type="email" required="required" class="full" data-message="Error Please Complete" autocomplete="off" />
</p>
<p>
<label><strong>Which date & ship are you interested in? *</strong></label>
<input name="date" id="date" type="text" required="required" class="full" data-message="Error Please Complete" autocomplete="off" />
</p>
<p>
<label><strong>If applicable which airport will you require?</strong></label>
<input name="airport" id="airport" type="text" class="full" autocomplete="off" />
</p>
<p>
<label><strong>Passengers *</strong></label>
<input name="adults" id="adults" type="text" required="required" class="passengers" data-message="Error Please Complete" size="4" autocomplete="off" />
Adults
<input name="kids" id="kids" type="text" class="passengers" size="4" autocomplete="off" />
Children
</p>
<p id="terms"> Please check this box if you do NOT wish to be added to our e-mail list
<input type="checkbox" name="nomail" id="nomail" value="No" />
</p>
<button type="submit">Submit Details</button>
<button type="reset">Reset</button>
<input type="hidden" value="callback-thanks.phtml" name="redirect" />
<input type="hidden" name="mailerid" value="7" />
<input type="hidden" name="enquiry" id="enquiry" value="Lewis Test" />
<input type="hidden" name="affiliate" id="affiliate" value="[INC:displayphoneno("143")]" />
</fieldset>
</form>
<script>
$("#myform").validator({
position: 'center left',
offset: [0, -151],
});
</script>
答案 0 :(得分:-1)