动态HTML表单未删除行-Javascript错误
我即将结束这个脚本,我注意到了一个错误。 可以向表中添加行,但是当我尝试删除行时,它似乎不起作用。我猜错误在我的JS中的某个地方。它以前工作过,然后突然停止工作!有人能解释一下吗 谢谢, 斯奈利动态HTML表单未删除行-Javascript错误,javascript,jquery,html,Javascript,Jquery,Html,我即将结束这个脚本,我注意到了一个错误。 可以向表中添加行,但是当我尝试删除行时,它似乎不起作用。我猜错误在我的JS中的某个地方。它以前工作过,然后突然停止工作!有人能解释一下吗 谢谢, 斯奈利 试验 函数计算(对象){ var QTY=object.parentNode.parentNode.querySelector(“#QTY”).value; var LINEPRICENET=object.parentNode.parentNode.querySelector(“#LINEPRICE
试验
函数计算(对象){
var QTY=object.parentNode.parentNode.querySelector(“#QTY”).value;
var LINEPRICENET=object.parentNode.parentNode.querySelector(“#LINEPRICENET”).value;
var LINEPRICEDISCOUNT=object.parentNode.parentNode.querySelector(“#LinePriceDiscountInput”).value;
var TAXRATE=object.parentNode.parentNode.querySelector(“#TAXRATE”).value;
//折价
LinePriceAfter折扣=(数量*(LINEPRICENET-(LINEPRICENET*(LinePrice折扣)));
object.parentNode.parentNode.querySelector(“#LinePriceAfterDiscount”).value=LinePriceAfterDiscount.toFixed(2);
//行价格折扣金额
linepricedefficintamount=(数量*(LINEPRICENET)-(数量*(LINEPRICENET-(LINEPRICENET*(linepricedefficion())));
object.parentNode.parentNode.querySelector(“#LinePriceDeffentAmount”).value=LinePriceDeffentAmount.toFixed(2);
//计税
TAXAMOUNT=(LinePriceAfter折扣*税率);
object.parentNode.parentNode.querySelector(“#TaxAmount”).value=TaxAmount.toFixed(2);
//计算总额
LINEPRICEGROSSAMOUNT=(LinePriceAfter折扣+税额);
object.parentNode.parentNode.querySelector(“#GrossOutput”).value=LINEPRICEGROSSAMOUNT.toFixed(2);
/******计算总数*******/
//网
var arr=document.getElementsByName('LinePriceAfterDiscount[]);
var-tot=0;
对于(变量i=0;i 如果(rowCount以下是工作代码:
函数deleteRow(tableID){
调试器;
var table=document.getElementById(tableID);
var rowCount=table.rows.length;
对于(变量i=0;i 如果(rowCount出于某种原因,childNodes[0]是文本,而childNodes[1]是您要查找的输入
试验
函数计算(对象){
var QTY=object.parentNode.parentNode.querySelector(“#QTY”).value;
var LINEPRICENET=object.parentNode.parentNode.querySelector(“#LINEPRICENET”).value;
var LINEPRICEDISCOUNT=object.parentNode.parentNode.querySelector(“#LinePriceDiscountInput”).value;
var TAXRATE=object.parentNode.parentNode.querySelector(“#TAXRATE”).value;
//折价
LinePriceAfter折扣=(数量*(LINEPRICENET-(LINEPRICENET*(LinePrice折扣)));
object.parentNode.parentNode.querySelector(“#LinePriceAfterDiscount”).value=LinePriceAfterDiscount.toFixed(2);
//行价格折扣金额
linepricedefficintamount=(数量*(LINEPRICENET)-(数量*(LINEPRICENET-(LINEPRICENET*(linepricedefficion())));
object.parentNode.parentNode.querySelector(“#LinePriceDeffentAmount”).value=LinePriceDeffentAmount.toFixed(2);
//计税
TAXAMOUNT=(LinePriceAfter折扣*税率);
object.parentNode.parentNode.querySelector(“#TaxAmount”).value=TaxAmount.toFixed(2);
//计算总额
LINEPRICEGROSSAMOUNT=(LinePriceAfter折扣+税额);
object.parentNode.parentNode.querySelector(“#GrossOutput”).value=LINEPRICEGROSSAMOUNT.toFixed(2);
/******计算总数*******/
//网
var arr=document.getElementsByName('LinePriceAfterDiscount[]);
var-tot=0;
对于(变量i=0;i