2012-10-16 48 views
0

任何jquery插件的路径,这是易于使用的形式验证每个和每个文本框的 形式。哪些代码用于表单验证?

enter code here <form id="form1" name="form1" method="post" action=""><table width="500" align="center"> 
<tr> 
    <td colspan="2" align="center"><strong>Please Add Bill Record</strong></td> 
</tr> 
<tr> 
    <td width="133">Number</td> 
    <td width="355"><input type="text" name="number" id="number" /></td> 
</tr> 
<tr> 
    <td>Amount</td> 
    <td><input type="text" name="amount" id="amount" /></td> 
</tr> 
<tr> 
    <td>type</td> 
    <td><label for="elc"></label> 
    <select name="elc" id="elc" tabindex="3"> 
     <option>elecricity</option> 
     <option>gas</option> 
     <option>telephone</option> 
    </select></td> 
</tr> 
<tr> 
    <td>&nbsp;</td> 
    <td>&nbsp;</td> 
</tr> 
<tr> 
    <td>&nbsp;</td> 
    <td><input type="submit" name="submit" id="submit" value="Save" /> 
    <input type="reset" name="clear" id="clear" value="Clear" /></td> 
</tr> 

iwannt验证形式的文本框每对blur.how其容易的jQuery。

+0

有关模糊验证,请参见[this](http://stackoverflow.com/questions/4622232/jquery-validation-onblur)或[this](http://stackoverflow.com/questions/4263984/jquery-在模糊验证) – Subha

回答

0

The jQuery validate plugin是jQuery的实际验证器。易于设置,高度可配置。严重的是,这是最好的有:)

这也是存在的最古老的jQuery插件之一,被的jQuery UI的开发者之一书面...