哈哈哈,我们做的项目就用到了这个东西。
做一个隐藏文本框,专门用来存放该页内的公式,然后,在每一个 input 的 onchange 事件中,把这个表达式重新计算一边就行了。很简单!你可以把表达式写为:字段名=
在表格第一行 每一个加上相应字断名,然后,改变的时候,找到相应的列,就可以计算。
做一个隐藏文本框,专门用来存放该页内的公式,然后,在每一个 input 的 onchange 事件中,把这个表达式重新计算一边就行了。很简单!你可以把表达式写为:字段名=
在表格第一行 每一个加上相应字断名,然后,改变的时候,找到相应的列,就可以计算。
解决方案 »
- 一个有关引号的问题
- 腾讯微薄广播那个框框在点击的时候边框由细缓慢变粗怎么实现的?
- 关于javascript的一些疑问
- 客户端读写服务器端的文本文件
- 播放器的 进度条
- JS高手进,救命贴啊
- 请问学了计算机网络之后如何巩固所学知识
- 删除不了 checked 属性???
- JavaScript如何删除动态添加的OPTGROUP 急!急!急!
- 各位高手,关于刷新的问题,请指点.急!!!!!
- 请问:怎样用javascript把客户端某个xml文件读出来? xmldoc.load('c:/test/test.xml')就可以了吗?
- 怎么取得<html:select .../>标签中的值和名称?这个问题搞了我一个星期了。没有结果...
table 格式:
<table>
<tr><td name="a">aaaa</td><td name="b">bbbbbb</td><td name="c">cccccc</td><td> name="d"ddddddd</td><td name="e">eeeee</td></tr>
<tr><td><input value="" onchange="count(this)"></td><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td><td><input value=""></td><td><input value="" onchange="count(this)></td></tr>
<tr><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td></tr>
<tr><td><input value="" onchange="count(this)></td><td><input value=""></td><td><input value=""></td><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td></tr>
<tr><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td><td><input value="" onchange="count(this)></td></tr>
</table><input type=hidden value="b=a*c" id="agrr">
</script>/*************计算表达式(在多行录入界面上用的计算关系是转换)****************************/
//下面是我的转换函数,呢子看看,思路交给你了,对照着我的,你再看看,要想做成通用的,就的下点功夫,如果简单的很简单,关键是各个页面的通用。不管表达式怎么变化,不管列的顺序怎么变化,都可以用,当然西面的不一定能给你用的上,给你提供一个思路
function count_exp(n){
try{
var myRow=n.parentNode.parentNode;
var mytbl=n.parentElement.parentElement.parentElement.parentElement;
for(var i=0;i<mytbl.rows(0).cells.length;i++){
var str=mytbl.rows(0).cells(i).exp;
if(!isEmpty(str)){
var conStr="";
var conStr1="";
for(var t=0;t<str.length;t++){
var num=str.charCodeAt(t)
if(num>=97&&num<=122||num>=65&&num<=90||num>=48&&num<=57)
{conStr1+=str.charAt(t);
}
else{
if(!isEmpty(conStr1)&&!myIsNumeric(conStr1)){
for(var m=0;m<myRow.cells.length;m++){
if(mytbl.rows(0).cells(m).name.toUpperCase()==conStr1.toUpperCase()){
conStr1="myRow.cells("+m+").firstChild.value";
if(conStr.indexOf("=")!="-1")
conStr1="parseFloat("+conStr1+")" }
}
}
conStr+=conStr1+str.charAt(t);
conStr1=""
}
}
if(!isEmpty(conStr1)&&!myIsNumeric(conStr1)){
for(var m=0;m<myRow.cells.length;m++)
if(mytbl.rows(0).cells(m).name.toUpperCase()==conStr1.toUpperCase()){
conStr1="myRow.cells("+m+").firstChild.value";
if(conStr.indexOf("=")!="-1")
conStr1="parseFloat("+conStr1+")"
}
}
conStr+=conStr1;
conStr1="";
eval(conStr);
var mn=conStr.indexOf("=");
var re=/value/g;
var name1=conStr.slice(0,mn);
var q=name1.lastIndexOf(".");
var thisname=eval(name1.slice(0,q));
conStr="";
if(!myIsNumeric(myRow.cells(i).firstChild.value))myRow.cells(i).firstChild.value="";
if(myIsNumeric(myRow.cells(i).firstChild.value)&&myRow.cells(i).firstChild.value!="")myRow.cells(i).firstChild.value=parseFloat(myRow.cells(i).firstChild.value).toFixed(2);
thisname.selvalue=thisname.value;
//if(myRow.cells(i).firstChild.selvalue=='NaN')myRow.cells(i).firstChild.selvalue="";
} else continue;
}}catch(e){window.status=e.message+e.description}
}</script>
<HTML>
<HEAD>
<TITLE> ¶©»õµ¥ </TITLE>
</HEAD>
<BODY onclick='document.all.haha.style.display="none";' topmargin=0 leftmargin=0 >
<div name=haha id=haha style='position:absolute;display:none;height:100px;overflow:auto;z-index:1'>
</div>
<form name=form1 action='orderwares_save.asp' method=post onsubmit='return checkin();' >
<table border=1 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td></td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td width=80 >¹© »õ ÉÌ:</td><td width=180 >
<select name=supplier >
<!----#include file='../inc/inc_supplier.asp'--->
</select></td>
<td width=80 >ÈÕ ÆÚ:</td><td width=180><input type=text name=dh_time readonly onclick='setday(this)' value='<%=formatdatetime(now,2)%>'></td>
<td width=80>¶©µ¥±àºÅ:</td>
<td><input type=text name=dh_code value='<%=dh_code%>' ></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td width=80 >¶©»õʱ¼ä:</td><td width=180 ><input type=text name=dh_ordertime readonly onclick='setday(this)' value='<%=formatdatetime(now,2)%>'></td><td width=80 >½»»õÈÕÆÚ:</td><td><input type=text name=dh_delivertime readonly onclick='setday(this)'> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td width=80 >½»»õµØµã:</td><td align=left ><input type=text name=dh_deliveraddress > </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% id=dh_sub_table >
<tr align=center >
<td>ÉÌÆ·±àÂë</td><td>ÐͺÅ</td><td>¹æ¸ñ</td><td>µ¥Î»</td><td>ÊýÁ¿</td><td>¼Û¸ñ</td><td>Ë°ÂÊ</td><td>Ë°¶î</td><td>½ð¶î</td><td>ÊÕ»õÊýÁ¿</td><td>±¸×¢</td><td> </td><td></td>
</tr>
<tr>
<td><input type=text name=dh_sub_product_code_1 onkeyup='javascript:selectit(this)' ><input type=hidden name=dh_sub_product_id_1></td><td><input type=text size=10 name=dh_sub_model_1 ></td><td><input type=text name=dh_sub_spec_1 size=10></td><td><input type=text name=dh_sub_product_unit_1 size=2></td><td><input type=text name=dh_sub_ys_number_1 onkeyup='javascript:count_tax_count(1)' size=10></td><td><input type=text name=dh_sub_price_1 size=6></td><td><input type=text name=dh_sub_tax_per_1 size=3></td><td><input type=text name=dh_sub_tax_count_1 size=10></td><td><input type=text name=dh_sub_ys_sum_1 size=10></td><td><input type=text name=dh_sub_ss_number_1 size=10></td><td><input type=text name=dh_sub_memo_1 size=10></td><td ><input type=button value='Add' style='border:1px solid red;' onclick='javascript:addrow();'><input type=hidden value=1 name=count_sign></td><td> </td>
</tr>
</table>
</td>
</tr>
<HTML>
<HEAD>
<TITLE> 订货单 </TITLE>
</HEAD>
<BODY onclick='document.all.haha.style.display="none";' topmargin=0 leftmargin=0 >
<div name=haha id=haha style='position:absolute;display:none;height:100px;overflow:auto;z-index:1'>
</div>
<form name=form1 action='orderwares_save.asp' method=post onsubmit='return checkin();' >
<table border=1 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td></td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td width=80 >供 货 商:</td><td width=180 >
<select name=supplier >
<!----#include file='../inc/inc_supplier.asp'--->
</select></td>
<td width=80 >日 期:</td><td width=180><input type=text name=dh_time readonly onclick='setday(this)' value='<%=formatdatetime(now,2)%>'></td>
<td width=80>订单编号:</td>
<td><input type=text name=dh_code value='<%=dh_code%>' ></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td width=80 >订货时间:</td><td width=180 ><input type=text name=dh_ordertime readonly onclick='setday(this)' value='<%=formatdatetime(now,2)%>'></td><td width=80 >交货日期:</td><td><input type=text name=dh_delivertime readonly onclick='setday(this)'> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td width=80 >交货地点:</td><td align=left ><input type=text name=dh_deliveraddress > </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% id=dh_sub_table >
<tr align=center >
<td>商品编码</td><td>型号</td><td>规格</td><td>单位</td><td>数量</td><td>价格</td><td>税率</td><td>税额</td><td>金额</td><td>收货数量</td><td>备注</td><td> </td><td></td>
</tr>
<tr>
<td><input type=text name=dh_sub_product_code_1 onkeyup='javascript:selectit(this)' ><input type=hidden name=dh_sub_product_id_1></td><td><input type=text size=10 name=dh_sub_model_1 ></td><td><input type=text name=dh_sub_spec_1 size=10></td><td><input type=text name=dh_sub_product_unit_1 size=2></td><td><input type=text name=dh_sub_ys_number_1 onkeyup='javascript:count_tax_count(1)' size=10></td><td><input type=text name=dh_sub_price_1 size=6></td><td><input type=text name=dh_sub_tax_per_1 size=3></td><td><input type=text name=dh_sub_tax_count_1 size=10></td><td><input type=text name=dh_sub_ys_sum_1 size=10></td><td><input type=text name=dh_sub_ss_number_1 size=10></td><td><input type=text name=dh_sub_memo_1 size=10></td><td ><input type=button value='Add' style='border:1px solid red;' onclick='javascript:addrow();'><input type=hidden value=1 name=count_sign></td><td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td width=80 >采 购 员:</td><td width=200 ><select name=dh_buyer><!-----#include file='../inc/inc_user.asp'-----></select></td><td width=80 >录 入 员:</td><td width=200 ><select name=dh_inputer ><!-----#include file='../inc/inc_user.asp'-----></select> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellpadding=0 width=100% >
<tr>
<td ><input type=submit value='确 定'> <input type=reset value='取 消' > <input type=button value='返 回' onclick='history.back()' ></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</BODY>
</HTML>
<!--
function checkit(a){
if (document.all("dh_sub_product_code_"+a).value==""){
alert("没有商品编码!");
document.all("dh_sub_product_code_"+a).focus();
flag=false;
return (flag);
}
if (document.all("dh_sub_model_"+a).value==""){
alert("没有商品型号!");
document.all("dh_sub_model_"+a).focus();
flag=false;
return (flag);
}
if (document.all("dh_sub_spec_"+a).value==""){
alert("没有商品规格!");
document.all("dh_sub_spec_"+a).focus();
flag=false;
return (flag);
}
if (document.all("dh_sub_product_unit_"+a).value==""){
alert("没有商品单位!");
document.all("dh_sub_product_unit_"+a).focus();
flag=false;
return (flag);
}
if (document.all("dh_sub_ys_number_"+a).value==""){
alert("没有数量!");
document.all("dh_sub_ys_number_"+a).focus();
flag=false;
return (flag);
}
if (isNaN(document.all("dh_sub_ys_number_"+a).value)){
alert("不是数值");
document.all("dh_sub_ys_number_"+a).focus();
flag=false;
return (flag);
}
if (document.all("dh_sub_price_"+a).value==""){
alert("没有商品价格!");
document.all("dh_sub_price_"+a).focus();
flag=false;
return (flag);
}
if (isNaN(document.all("dh_sub_price_"+a).value)){
alert("不是数值");
document.all("dh_sub_price_"+a).focus();
flag=false;
return (flag);
}
if (document.all("dh_sub_tax_per_"+a).value==""){
alert("没有商品税率!");
document.all("dh_sub_tax_per_"+a).focus();
flag=false;
return (flag);
}
if (isNaN(document.all("dh_sub_tax_per_"+a).value)){
alert("不是数值");
document.all("dh_sub_tax_per_"+a).focus();
flag=false;
return (flag);
}
if (document.all("dh_sub_tax_count_"+a).value==""){
alert("没有商品税额!");
document.all("dh_sub_tax_count_"+a).focus();
flag=false;
return (flag);
}
if (isNaN(document.all("dh_sub_tax_count_"+a).value)){
alert("不是数值");
document.all("dh_sub_tax_count_"+a).focus();
flag=false;
return (flag);
}
if (document.all("dh_sub_ys_sum_"+a).value==""){
alert("没有商品金额!");
document.all("dh_sub_ys_sum_"+a).focus();
flag=false;
return (flag);
}
if (isNaN(document.all("dh_sub_ys_sum_"+a).value)){
alert("不是数值");
document.all("dh_sub_ys_sum_"+a).focus();
flag=false;
return (flag);
}
/*
if (document.all("dh_sub_ss_number_"+a).value==""){
alert("没有商品收货数量!");
document.all("dh_sub_ss_number_"+a).focus();
flag=false;
return (flag);
}
if (isNaN(document.all("dh_sub_ss_number_"+a).value)){
alert("不是数值");
document.all("dh_sub_ss_number_"+a).focus();
flag=false;
return (flag);
}
*/
}
function checkin(){
flag=true;
form=document.form1;
if (form.dh_time.value==""){
alert("没有订货日期!");
return false;
}
if (form.dh_code.value==""){
alert("没有订单编号!");
return false;
}
if (form.dh_delivertime.value==""){
alert("没有交货日期!");
return false;
}
if (form.dh_deliveraddress.value==""){
alert("没有交货地址!");
return false;
}
c=document.all.count_sign;
// alert(c.length)
if (c.length==null || c.length==""){
checkit(c.value);
}
else{
for (i=1;i<c.length;i++){
// alert(c[i].value);
checkit(c[i].value);
}
}
if (flag){return true;}
else{return false;}
}function deleteit(id){
flag=true;
del_flag=false;
for (i=0;i<dh_sub_table.rows(id).cells.length-2;i++){
// alert(dh_sub_table.rows(id).cells(i).childNodes(0).name)
if (dh_sub_table.rows(id).cells(i).childNodes.length>0){
if (dh_sub_table.rows(id).cells(i).childNodes(0).value!="")flag=false;
}
}
if (!flag){
if (confirm("确定要删除嘛?")){
dh_sub_table.deleteRow(id);
del_flag=true;
}
}
else{
dh_sub_table.deleteRow(id);
del_flag=true;
}
if (del_flag){
for (i=id;i<dh_sub_table.rows.length;i++){
for (j=0;j<=dh_sub_table.rows(i).cells.length-1;j++){
dh_name=dh_sub_table.rows(i).cells(j).childNodes(0).name;
// alert(dh_name.substring(dh_name.lastIndexOf("_")+1,dh_name.length));
//alert("+parseInt(dh_name.substring(dh_name.lastIndexOf("_")+1,dh_name.length)-1,10)+")
if (j==dh_sub_table.rows(i).cells.length-1){
dh_sub_table.rows(i).cells(j).innerHTML="<input type=button value='Del' onclick='javascript:deleteit("+parseInt(dh_name.substring(dh_name.lastIndexOf("_")+1,dh_name.length)-1,10)+")' style='border:1px solid red ;'>"
}
new_dh_name=dh_name.substring(0,dh_name.lastIndexOf("_")+1)+""+parseInt(dh_name.substring(dh_name.lastIndexOf("_")+1,dh_name.length)-1,10);
dh_sub_table.rows(i).cells(j).childNodes(0).name=new_dh_name;
}
}
}
}
function addrow(){
dh_sub_table_row=dh_sub_table.rows;
i=dh_sub_table.rows.length;
alert(i);
// for (i=1;i<=5;i++){
dh_sub_tr=dh_sub_table.insertRow();
dh_sub_product_code=dh_sub_tr.insertCell();
dh_sub_product_code.innerHTML="<input type=text name='dh_sub_product_code_"+i+"' onkeyup='javascript:selectit(this)' ><input type=hidden name='dh_sub_product_id_"+i+"'>";
dh_sub_model=dh_sub_tr.insertCell();
dh_sub_model.innerHTML="<input type=text name=dh_sub_model_"+i+" size=10>";
dh_sub_spec=dh_sub_tr.insertCell();
dh_sub_spec.innerHTML="<input type=text name=dh_sub_spec_"+i+" size=10>";
dh_sub_unit=dh_sub_tr.insertCell();
dh_sub_unit.innerHTML="<input type=text name=dh_sub_product_unit_"+i+" size=2>";
dh_sub_number=dh_sub_tr.insertCell();
dh_sub_number.innerHTML="<input type=text name=dh_sub_ys_number_"+i+" onkeyup='javascript:count_tax_count(\""+i+"\")' size=10>";
dh_sub_price=dh_sub_tr.insertCell();
dh_sub_price.innerHTML="<input type=text name=dh_sub_price_"+i+" size=6>";
dh_sub_tax_per=dh_sub_tr.insertCell();
dh_sub_tax_per.innerHTML="<input type=text name=dh_sub_tax_per_"+i+" size=3>";
dh_sub_tax_count=dh_sub_tr.insertCell();
dh_sub_tax_count.innerHTML="<input type=text name=dh_sub_tax_count_"+i+" size=10>";
dh_sub_count=dh_sub_tr.insertCell();
dh_sub_count.innerHTML="<input type=text name=dh_sub_ys_sum_"+i+" size=10>";
dh_sub_deliver_count=dh_sub_tr.insertCell();
dh_sub_deliver_count.innerHTML="<input type=text name=dh_sub_ss_number_"+i+" size=10>";
dh_sub_memo=dh_sub_tr.insertCell();
dh_sub_memo.innerHTML="<input type=text name=dh_sub_memo_"+i+" size=10>";
dh_sub_add=dh_sub_tr.insertCell();
dh_sub_add.innerHTML="<input type=button value='Add' hidefocus name='addit_"+i+"' style='border:1px solid red;' onclick='javascript:addrow();'>";
dh_sub_del=dh_sub_tr.insertCell();
dh_sub_del.innerHTML="<input type=button value='Del' name=delit_"+i+" style='border:1px solid red;' onclick='javascript:deleteit("+i+");'><input type=hidden value='"+i+"' name=count_sign >";
}
function testit(){
parent_Node=event.srcElement.parentNode.parentNode;
alert(parent_Node.childNodes.length);
for (i=0;i<parent_Node.childNodes.length;i++){
alert(parent_Node.childNodes(i).childNodes(0).name);
}
}
//-->
</SCRIPT>
<%
set myrs=conn.execute("select p.*,isnull(sup.sup_rate,17) as rate from products p,supplier_table sup where p.p_supplier = sup.sup_id and p.master_id = '"&master_id&"' and p.backup_sign='no' and p.p_delsign = 'no' order by p.p_code desc ")%>
<SCRIPT LANGUAGE="JavaScript">
<!--
var Myarray=new Array();
<%
count=0
While not myrs.eof
%>
Myarray[<%=count%>]=new Array("<%=myrs("p_name")%>","<%=myrs("p_code")%>","<%=myrs("p_spec")%>","<%=myrs("p_intaxprice")%>","<%=myrs("rate")%>","<%=myrs("p_id")%>","<%=myrs("p_model")%>");
<%
count=count+1
myrs.movenext
Wend
%>
function selectit(it){
// alert(event.keyCode)
if (event.keyCode==13 || event.keyCode==27){
document.all.haha.style.display="none";
}
else{
reloadit=false;
document.all.haha.style.position="absolute";
document.all.haha.style.display='';
document.all.haha.style.zIndex=99;
tempit=it;
ttop=tempit.offsetHeight;
tleft=tempit.offsetLeft;
while(tempit = tempit.offsetParent){ttop+=tempit.offsetTop; tleft+=tempit.offsetLeft;}
document.all.haha.style.top=ttop;
document.all.haha.style.left=tleft;
document.all.haha.style.width='160px';
aavalue=it.value.toLowerCase();
s="<table border=0 cellspacing=0 cellpadding=0 width=100% >"
for (i=0;i<Myarray.length;i++){
hahaSubChild_value=Myarray[i][1];
if (hahaSubChild_value.toLowerCase().indexOf(aavalue)>=0){
s+="<tr ><td><input type=text name='t"+i+"' value='"+hahaSubChild_value+"' readonly onmouseover='this.select();' onclick='javascript:getit(\""+i+"\",\""+it.name+"\");' style='border:1px solid black;height:15px;font-size:9pt;width:150px;'></td></tr>";
reloadit=true;
}
}
s+="</table>";
if (reloadit){
document.all.haha.innerHTML=s;
}
}
// alert(s)
}
function loadit(){
s="<table border=1 cellspacing=0 cellpadding=0 width=100% >"
for (i=0;i<Myarray.length;i++){
s+="<tr ><td><input type=text name='t"+i+"' value='"+Myarray[i][1]+"' readonly onmouseover='this.select();' style='border:1px solid red'></td></tr>";
}
s+="</table>";
document.all.haha.innerHTML=s;
}
window.onload=loadit;
function getit(i,itname){
// alert(itname);
//alert(document.getElementsByName(itname.name)[0].name);
name_sign=itname.substring(itname.lastIndexOf("_")+1,itname.length);
document.getElementsByName(itname)[0].value=Myarray[i][1];
document.getElementsByName("dh_sub_model_"+name_sign)[0].value=Myarray[i][6];
document.getElementsByName("dh_sub_spec_"+name_sign)[0].value=Myarray[i][2];
document.getElementsByName("dh_sub_price_"+name_sign)[0].value=Myarray[i][3];
document.getElementsByName("dh_sub_tax_per_"+name_sign)[0].value=Myarray[i][4];
document.getElementsByName("dh_sub_product_id_"+name_sign)[0].value=Myarray[i][5];
document.all.haha.style.display="none";
}
function count_tax_count(id){
// alert(Math.floor(document.all("dh_sub_tax_count_"+id).value))
if(isNaN(document.all("dh_sub_ys_number_"+id).value) || (document.all("dh_sub_ys_number_"+id).value=="") || (document.all("dh_sub_tax_per_"+id).value=="") || (document.all("dh_sub_tax_per_"+id).value==0 ) || (document.all("dh_sub_price_"+id).value=="" ) || (document.all("dh_sub_price_"+id).value==0) ){
document.all("dh_sub_tax_count_"+id).value=0;
document.all("dh_sub_ys_sum_"+id).value=0;
}
else{
document.all("dh_sub_tax_count_"+id).value=parseFloat(parseFloat(document.all("dh_sub_price_"+id).value)/(1+parseFloat(document.all("dh_sub_tax_per_"+id).value/100))*parseFloat(document.all("dh_sub_tax_per_"+id).value/100)*parseInt(document.all("dh_sub_ys_number_"+id).value)).toFixed(2);
document.all("dh_sub_ys_sum_"+id).value=parseFloat(parseInt(document.all("dh_sub_ys_number_"+id).value)*parseFloat(document.all("dh_sub_price_"+id).value)).toFixed(2);
}
}
//-->
</SCRIPT>