请帮助我是新手。我想进行计算(所选值可被 1000 整除)和乘以 Amount 并且应该存储在第 5 列中。即 Product1 = (100 / 1000) * 100 = 10
这是我的代码:
<table border="1">
<tbody>
<tr>
<td width="334">S.No.</td>
<td width="334">Product Name</td>
<td width="334">Amount</td>
<td width="334">Grams/Kg</td>
<td width="334">Final Amount</td>
</tr>
<tr align="center">
<td>1</td>
<td>Product1</td>
<td>100</td>
<td>
<select id="grams">
<option value=""></option>
<option value="100">100g</option>
<option value="250">250g</option>
<option value="500">500g</option>
</select>
</td>
<td>I want to do calculation (selectedvalue / 1000) * Amount, that amount want to reflect here</td>
</tr>
<tr align="center">
<td>2</td>
<td>Product2</td>
<td>200</td>
<td>
<select id="grams">
<option value=""></option>
<option value="100">100g</option>
<option value="250">250g</option>
<option value="500">500g</option>
</select>
</td>
<td>I want to do calculation (selectvalue / 1000) * Amount, that amount want to reflect here</td>
</tr>
</tbody>