红色的部分,调试不了,为什么?
函数pppp()就可以用,,这两个函数不是都一样吗.
那位 高手给我解答:谢谢
<title>求助</title>
<script language="javascript">
function price(){
//var count=document.form1;
var price_num;
var price_sale;
var price;
price_num=parseFloat(document.form1.ordernum.value);
price_sale=parseFloat(document.form1.saleprice.value);
price=price_num*price_sale;
document.form1.price.value=price;
}
function pppp(){
var p1;
var p2;
var p3;
p1=parseFloat(document.form1.a.value);
p2=parseFloat(document.form1.b.value);
p3=p1*p2
document.form1.c.value=p3;
}
</script>
</head>
<body>
<form name="form1" method="post" action="">
<table width="560" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td colspan="4">订单基本信息</td>
</tr>
<tr>
<td width="169"><div align="right">订购数量:</div></td>
<td width="70"><input name="ordernum" type="text" id="ordernum" size="10" ></td>
<td width="97"><div align="right">产品单价</div></td>
<td width="174"><input name="saleprice" type="text" id="saleprice" value="20" size="6" readonly="yes">
元</td>
</tr>
<tr>
<td><div align="right">总金额:</div></td>
<td colspan="3"><input name="price" type="text" id="price" size="10" readonly="yes" ></td>
</tr>
<tr>
<td colspan="4"><div align="center">
<input type="submit" name="Submit2" value="确定" onClick="price()">
</div></td>
</tr>
</table>
<p>
<input name="a" type="text" id="a">
</p>
<p>
<input name="b" type="text" id="b" onBlur="pppp()">
</p>
<p>
<input name="c" type="text" id="c">
</p>
</form>