我有几组问题,每组问题包含 2 个输入字段。
<!--Question Set-->
<tr class="options_row">
<td>
<img src="images/top_bullet.gif" alt="bullet" />
I will only be satisfied with a usually high standard of living </td>
<td width="5%">
<input name="score[]" type="text" class="score num" title="1" maxlength="1" />
</td>
</tr>
<tr class="options_row">
<td>
<img src="images/top_bullet.gif" alt="bullet" />
I wish to have considerable influence over other people. </td>
<td width="5%">
<input name="score[]" type="text" class="score num" title="2" maxlength="1" />
</td>
</tr>
现在我需要验证 2each 输入值集
例如
->问题集1->Input_1 + Input_2 >=3
->问题集1->Input_1 + Input_2 <=3
我尝试过使用该closest
功能,但它不起作用。
var score_val = $(this).closest('.score');
谢谢。