我对 jQuery mobile 很陌生,我正在使用 jQuery Validate 插件进行表单控件验证,一切正常,但验证消息与输入文本框一起显示。这是图像:
jQuery
$(document).live('pageinit', function (e) {
$('#form1').validate({
submitHandler: function (form) {
$.mobile.changePage('#success', { transition: "slide" });
return false;
}
});
});
HTML
<div data-role="fieldcontainer">
<label for="fname" data-theme="d">First Name:</label>
<input type="text" id="fname" name="fname" data-theme="d" placeholder="Enter First Name" required>
<br />
</div>
<div data-role="fieldcontainer">
<label for="lname" data-theme="d">Last Name:</label>
<input type="text" id="lname" name="lname" data-theme="d" placeholder="Enter Last Name" required>
</div>
<div data-role="fieldcontainer">
<label for="email" data-theme="d">E-mail Address:</label>
<input type="email" id="email" name="email" data-theme="d" placeholder="Enter Email" required>
</div>