我需要自動計數(不刷新)的JavaScript/jQuery的功能,這讓我的公式算我幫助:自動計算值與的onkeyup JS/jQuery的
機會= SUM(輸入的人)*號。
問題是,這是很多領域,約100,但我需要計算每個單獨的「機會」。 這裏是代碼,要理解一個問題:
<table>
<tr>
<th></th>
<th>Name</th>
<th>Number</th>
<th>Chance</th>
<th>Sum</th>
</tr>
<tr>
<td><input type="checkbox" name="check[]" value="id1" /></td>
<td>test1</td>
<td>0.5</td>
<td><span id="chance1" >NEED AUTO VALUE AFTER COUNTING HERE!</span></td>
<td><input type="text" onkeyup="some function?" name="sum1" /></td>
</tr>
<tr>
<td><input type="checkbox" name="check[]" value="id2" /></td>
<td>test2</td>
<td>0.7</td>
<td><span id="chance2" >NEED AUTO VALUE AFTER COUNTING HERE!</span></td>
<td><input type="text" onkeyup="some function?" name="sum2" /></td>
</tr>
<tr>
<td><input type="checkbox" name="check[]" value="id3" /></td>
<td>test3</td>
<td>0.9</td>
<td><span id="chance3" >NEED AUTO VALUE AFTER COUNTING HERE!</span></td>
<td><input type="text" onkeyup="some function?" name="sum3" /></td>
</tr>
</table>
是的,它的工作原理。萬分感謝。我沒有降低你的評價!非常感謝你。 –