$.ajax({ url : "order/order_orderDetail.do?params.type=merge", type : "post", data : params, success : function(xml) { hide(); if(xml == ""){ Dialog.popTip("找不到需要合并的订单", 2); }else{ var myTable=document.getElementById( "t_product" ); //遍历"ORDER"节点 $(xml).find('ORDER').each(function(){ var id = $(this).find("ORDERID").text(); var status = $(this).find("STATUS").text();
if(xmlHttp.readyState ==4){ if(xmlHttp.status ==200){ hide(); var xml = xmlHttp.responseXML; if(xml == null){ Dialog.popTip("找不到需要合并的订单", 2); }else{ var myTable=document.getElementById("t_product" ); var orders = xml.getElementsByTagName("ORDER"); for(var i=0;ivar order = orders[i]; var id = order.getElementsByTagName("ORDERID")[0].childNodes[0].nodeValue; var status =order.getElementsByTagName("STATUS")[0].childNodes[0].nodeValue; alert(status); if(status == "1"){ status="未确认"; }else{ status="已确认"; } var newRow = myTable.insertRow(); var oCell = newRow.insertCell(); oCell.setAttribute("height","25"); oCell.innerHTML=" "; oCell = newRow.insertCell(); oCell.innerHTML="*订单"+id+" 的状态为:"+status+",商品情况如下"; oCell = newRow.insertCell(); oCell.innerHTML=" "; oCell = newRow.insertCell(); oCell.innerHTML=" ";
var products = order.getElementsByTagName("PRODUCT"); for(var i=0;ivar product = products[i]; var pid = product.getElementsByTagName("PRODUCTID")[0].childNodes[0].nodeValue; var pname = product.getElementsByTagName("PRODUCTNAME")[0].childNodes[0].nodeValue; var purl = product.getElementsByTagName("PRODUCTURL")[0].childNodes[0].nodeValue; var pprice = product.getElementsByTagName("PRICE")[0].childNodes[0].nodeValue; var pcount = product.getElementsByTagName("GOODSCOUNT")[0].childNodes[0].nodeValue; newRow = myTable.insertRow(); oCell = newRow.insertCell(); oCell.setAttribute("height","25"); oCell.innerHTML=pid; oCell = newRow.insertCell(); oCell.innerHTML=""+pname+""; oCell = newRow.insertCell(); oCell.innerHTML="" oCell = newRow.insertCell(); oCell.innerHTML=pprice; } } } } }
Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn