var data = [] for (i = 0; i < len; i++) { var factory = _g().getCellValue(0, 1, i + 4); //获取B5的扩展值 var wl = _g().getCellValue(0, 2, i + 4); //获取C5的扩展值 data.push({ "MATNR": wl, "WERKS": factory }) } $.ajax({ url: "/webroot/decision/url/sapApi", type: "POST", contentType: "application/json", data: JSON.stringify(data), dataType: "json", success: function (e) { alert("提交响应:" + e) }, error: function () { alert("提交失败请联系技术支持查看日志") } })