window.onload = function (ev) { init(); } init = function () { getOrderInfo(); } getOrderInfo = function () { var oid = getUrlParam("oid"); var parameter = urlEncode(["OrderInfoSearch", oid]); $.ajax({ type: "post", url: "/new/php/index.php", data: {mode: parameter}, dataType: "json", success: function (data) { printOrderInfo(data); } }); } printOrderInfo = function (data) { var input = $('input[type="text"]'), id, value = data[0]; for (var i = 0; i < input.length; i++) { id = input.eq(i).attr("id"); input.eq(i).attr("value", value[id]); } $("#Remarks").val(value.Remarks); $(".filelist").html(""); if (value.ProductInfoClassId == "") { var color = value.ProductAttributeId.split(",")[1], colorimg = value.ProductAttributeId.split(",")[0], size = value.ProductAttributeId.split(",")[2]; $("#Color").val(color); $("#Size").val(size); $(".filelist").append($('
颜色分类:' + obj[i].color + '
' + (obj[i].size ? '尺寸:' + obj[i].size + '
' : '') + '