2013-07-01 78 views
0

我想使用Jquery驗證引擎,但我無法管理它的工作。我相信驗證引擎沒有附加表格,也許是因爲Div標籤。這是我的代碼,我希望你能幫助我。從here.jquery驗證引擎不附加

下載jQuery驗證引擎插件並解:

<link href="/css/style.css" rel="stylesheet" type="text/css"/> 
    <link rel="stylesheet" type="text/css" href="/css/coin-slider.css"/> 
    <script type="text/javascript" src="/js/cufon-yui.js"></script> 
    <script type="text/javascript" src="/js/cufon-titillium-250.js"></script> 
    <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script> 
    <script type="text/javascript" src="/js/script.js"></script> 
    <script type="text/javascript" src="/js/coin-slider.min.js"></script> 
    <script src="/js/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script> 
    <script src="/js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script> 
    <link rel="stylesheet" href="/css/validationEngine.jquery.css" type="text/css"/> 
    <link rel="stylesheet" href="/css/template.css" type="text/css"> 
    <script> 
     $(document).ready(function(){ 
      $("#invite").validationEngine(); 
     }); 
    </script> 
</head> 
<body> 
<div class="main" id="main"> 
    <div class="header"> 
     <div class="header_resize"> 

      <div class="clr"></div> 

      <div class="clr"></div> 
     </div> 
    </div> 
    <div class="content"> 
     <div class="content_resize"> 
      <div class="mainbar"> 
       <div class="article"> 
        <h2><span>Escriba</span> la información sobre el evento</h2> 

        <form action="/jsp/filtered/client/InviteServlet" method="post" name="invite" id="invite"> 
         <table> 
          <tr> 
           <td>Nombre del invitado:</td> 
           <td><input type="text" name="name" id="name" class="validate[required] text-input"></td> 
          </tr> 
          <tr> 
           <td>Apellido del invitado:</td> 
           <td><input type="text" name="lastname" id="lastname" class="validate[required] text-input"></td> 
          </tr> 
          <tr> 
           <td>Email del invitado:</td> 
           <td><input type="text" name="email" id="email" class="validate[required,custom[email]]"></td> 
          </tr> 
          <tr> 
           <td>Contraseña del invitado:</td> 
           <td><input type="password" name="pass" id="pass" class="validate[required]"></td> 
          </tr> 
          <tr> 
           <td><input type="submit" value="Invitar"></td> 
          </tr> 
         </table> 
        </form> 
        <div class="clr"></div> 
       </div> 
      </div> 
+0

控制檯中的任何錯誤? –

回答

0

關注這個。

在文件夾內可以找到這兩個文件。

jquery.validationEngine-en.js 
jquery.validationEngine.js 

複製&在資產 - > scripts-粘貼>你的工作項目。

然後改變像下面的src路徑。

<script src="assets/scripts/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script> 

<script src="assets/scripts/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>