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