我正在尝试使用 Jquery 验证引擎,但我无法管理它工作。我相信验证引擎没有附加表单,可能是因为 Div 标签。这是我的代码,希望你能帮助我。
<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>