function pdel(){
var productTab=window.frames["orderdetail"].document.getElementById("orderdetailform");
//获取frame并从中通过ID获取对象
var check=window.frames["orderdetail"].document.getElementsByName("checkbox");
var check2=window.frames["orderdetail"].document.getElementsByName("checkbox2");
var len=parseInt(document.getElementById("sig").value);
var i=0;
while(check.length>0 && i<check.length){
if (check[i].checked==true){
//从下面开始处理实时改总金额
if (check[i].value!="" && check2[i].value!=""){
var mon=parseInt(check[i].value);
var totalproduct=document.getElementById("tot").innerHTML;
if (totalproduct!=null && totalproduct!=""){
totalproduct=parseInt(totalproduct)-mon;
document.getElementById("tot").innerHTML=totalproduct;
}
var totalPrice= document.getElementById("totalPrice").value;
if (totalPrice!=null && totalPrice!=""){
totalPrice=parseInt(totalPrice)-mon;
document.getElementById("totalPrice").value=totalPrice;
}
//从现在开始处理实时改数量
var qua=parseInt(check2[i].value);
// alert(qua);
var totalq=document.getElementById("q").innerHTML;
if (totalq!=null && totalq!=""){
totalq=parseInt(totalq)-qua;
document.getElementById("q").innerHTML=totalq;
}
}
productTab.deleteRow(i+1);
i=0;
}else{
i++;
}
}
}