我的 jquery 验证表单没有验证 ..here is the code like
<script type='text/javascript'>
$(document).ready(function()
{
$('#frm').validationEngine('validate');
});
</script>
<div id='gap'> </div>
<div id='main'>
<div id='login-box'>
<h2><span> ".HD_LOGIN." </span></h2>
<table align='center'>
<form id='frm' name='frm' >
<tr>
<td class='name'> <span>".LBL_USERNAME." </span> </td>
<td> <span> </span> </td>
<td> <input type='text' name='username' id='username' class='input validate[required]'/><input type='hidden' name='login' value='1' /></td>
</tr>
<tr>
<td id='error-show'> <span>   </span> </td>
</tr>
<tr>
<td class='name'> <span>".LBL_PASSWORD."</span></td>
<td> <span> </span> </td>
<td> <input type='password' name='password' id='password' class='input validate[required]'/></td>
</tr>
<tr>
<td id='error-show'><span> </span> </td>
</tr>
<tr>
<td> <span> </span> </td>
<td> <span> </span> </td>
<td> <input class='chckbx' type='checkbox' name='rememberme' value='1'/> <span> ".CHCK_LOGGED." </span> </td>
</tr>
<tr>
<td> <span>   </span> </td>
</tr>
<tr>
<td colspan='3' align='center'> <input type='button' name='but' value='login' onclick=\"general_ajax1('modules/login/logincontroller.php',$('#frm').serialize())\"/></td>
</tr>
</form>
现在下面是自定义ajax
if($("#frm").validationEngine('validate'))
{
function general_ajax1(urld,data)
{
$.ajax({
type:'POST',
url:urld,
data:data,
success: function(response){$('#main_content').html(response);}
});
}
}