0
我做這個計算器在JavaScript與html和我有它的工作已經我只是想輸入純文本中的總數,而不是在我現在擁有的輸入框中....如何讓它寫入總量並且不在輸入框中顯示它?
JS小提琴在這裏: http://jsfiddle.net/Eliasperez/PDct2/1/
<div>Producto
<br />
<select id="producto1">
<option>Selecciona</option>
<option value="01">Curativo</option>
<option value="02">Preventiva</option>
</select>
</div>
<table>
<tbody>
<tr class="e01">
<td class="01">
<label>Cantidad</label>
<br />
<select id="elias">
<option value="1">1 Gr/m3</option>
</select>
</td>
<td class="02">
<label>Cantidad</label>
<br />
<select id="elias1">
<option value=".33">.33 Gr/m3</option>
</select>
</td>
</tr>
</tbody>
</table>
<div class="container">
<div>
<label for="CAT_Custom_500436">Cual es el volumen del area a tratar por metro cúbico? </label>
<br />
<input type="text" maxlength="255" name="CAT_Custom_500436" id="CAT_Custom_500436" />
</div>
<div>
<label for="CAT_Custom_500440">Total</label>
<br />
<input type="text" maxlength="255" name="CAT_Custom_500440" id="CAT_Custom_500440" />
</div>
</div>
<div class="error hide">Porfavor escoje un producto
</div>
如果它只是一個元素,您應該使用ID而不是類。 – Barmar
我創建了一個ID爲id的div和你放的代碼是爲我做的javascript?你可以通過jsfiddle讓我成爲一個例子,因爲我已經失去了,如果它沒有太多麻煩請。 –
無論您現在在何處定義總數,請添加上面的代碼。代碼片段只需要你的總數,並將其設置爲'#total' div的文本值 – helion3