动态添加的表格及输入框,如何自动计算二个输入框中的值并填入第三个框中
chjin 2008-11-24 10:02:32 ......
col = row.insertCell(2);
col.innerHTML = "<input type='text' name='fqty"+i+"' size=7 maxlength=7 value='0' onchange='chtotal();'>";
col = row.insertCell(3);
col.innerHTML = "<input type='text' name='fprice"+i+"' size=6 maxlength=6 value='0' onchange='chtotal();'>";
col = row.insertCell(4);
col.innerHTML = "<input type='text' name='ftotal"+i+"' size=8 readonly >";
......
chtotal()该如何写呢?