百思不得其解的问题,大家请看...
大家看看源代码,
当输入单价有2位小数时计算出错!
请高手更正下...
<html>
<head>
<title></title>
</head>
<body>
<table width="100%" border="1">
<tr>
<td>单价:</td>
<td>
<input name="price" type="text" value="5.56" size="10" onFocus="select();">
</td>
</tr>
<tr>
<td>数量:</td>
<td>
<input name="amount" type="text" value="10" size="10" onFocus="select();">
</td>
</tr>
<tr>
<td> </td>
<td>合计:
<input name="total" type="text" size="10" onFocus="this.value=price.value*amount.value">
<font color="#FF0000"><----------大家点这里看看</font></td>
</tr>
</table>
</body>
</html>