1 $().ready(function () { 2 // validate signup form on keyup and submit 3 $("#signupForm").validate({ 4 rules: { 5 firstname: "required", 6 lastname: "required" 7 }, 8 messages: { 9 firstname: "Please enter your firstname", 10 lastname: "Please enter your lastname" 11 } 12 }); 13 });
1 <form class="cmxform" id="signupForm" method="get" action=""> 2 <fieldset> 3 <legend>Validating a complete form</legend> 4 <p> 5 <label for="firstname">Firstname</label> 6 <input id="firstname" name="firstname" type="text" /> 7 </p> 8 <p> 9 <label for="lastname">Lastname</label> 10 <input id="lastname" name="lastname" type="text" /> 11 </p> 12 <p> 13 <input class="submit" type="submit" value="Submit" /> 14 </p> 15 </fieldset> 16 </form>
点击'submit'后提示红色部份内容:
但输入消息后,后面红色提示信息应马上消失才对,但只有执行多次点击事件之后才会消息,应该输入'm'信息就消息掉。【只在IE9上是这样,】
还望大侠们多多指教!问题没太懂的请提出来,谢谢了!
这个问题解决了嘛??