怎么出错了??
刚回复了 请问自动计算功能是如何实现的???高手帮忙!! 这篇帖子,怎么一提交就出错了!里面代码是这样的::
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>测试</title>
<script language="javascript">
function tick(price,num){
var sum_price
sum_price = price * num;
price_sum.innerHTML = sum_price.toLocaleString();
}
</script>
</head>
<body>
<%
DIM price
price="5.00"
%>
<form name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="24%" align="center">价格:</td>
<td width="76%"><%=price%> 元/单位</td>
</tr>
<tr>
<td align="center">数量:</td>
<td><input type="text" name="textfield" onKeyUp="tick(<%=price%>,this.value)" onKeyDown="tick(<%=price%>,this.value)"></td>
</tr>
<tr>
<td align="center">合计:</td>
<td><font id="price_sum"></font> 元</td>
</tr>
</table>
</form>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>测试</title>
<script language="javascript">
function tick(price,num){
var sum_price
sum_price = price * num;
price_sum.innerHTML = sum_price.toLocaleString();
}
</script>
</head>
<body>
<%
DIM price
price="5.00"
%>
<form name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="24%" align="center">价格:</td>
<td width="76%"><%=price%> 元/单位</td>
</tr>
<tr>
<td align="center">数量:</td>
<td><input type="text" name="textfield" onKeyUp="tick(<%=price%>,this.value)" onKeyDown="tick(<%=price%>,this.value)"></td>
</tr>
<tr>
<td align="center">合计:</td>
<td><font id="price_sum"></font> 元</td>
</tr>
</table>
</form>
</body>
</html>