我尝试使用验证查询,但不起作用

时间:2012-01-28 10:03:52

标签: jquery-plugins

这是标题

-

 <script type="text/javascript" src="js/jquery-1.6.min.js"></script>
 <link type="text/css" rel="stylesheet" 
 href="http://jquery-validatation-engine-extended.googlecode.com/files    
 /validationEngine.jquery.css" />
 <script type="text/javascript" src="http://jquery-validatation-engine-  
 extended.googlecode.com/files/jquery.validationEngine.js"></script>
 <script type="text/javascript" src="http://jquery-validatation-engine-  
 extended.googlecode.com/files/jquery.validationEngine-en.js"></script>

这里是js初始化jquery

    $("#formID").validationEngine({   /* create the form validation */
        inlineValidation: false,
        promptPosition: "centerRight",
        success :  function(){use_ajax=true},   /* if everything is OK enable AJAX     */
               failure : function(){use_ajax=false}    /* in case of validation    failure disable AJAX */
     })

这是html中的表单

 <form name=formID method=post action=devenir_membre2.php>
 <table width=85%  cellspacing=1>
  <tr><td width=50% style="padding-bottom: 15px;">Nickname:</td>
 <td width=50%>   <input type=text class="validate[required]" name=nickname></td></tr>
</table>
 </form>

我该怎么办?

关心,感谢阅读

1 个答案:

答案 0 :(得分:0)

为HTML表单指定正确的ID,即:

<form id="formId" name="...." ...