2 回答
TA贡献1951条经验 获得超3个赞
看法
<div id="divPartial2">
</div>
JS
var ActionParams = new Object();
ActionParams.ItemIds= ...;
$.ajax({
type: "POST",
url: url,
cache: false,
data: JSON.stringify(ActionParams),
contentType: "application/json",
datatype: "html",
success: function (data, textStatus, jqXHR) {
$("#divPartial2").html(data);
},
});
控制器
public ActionResult FilteredItems(List<int> itemIds)
{
//get only items for second container
return PartialView("Container");
}
TA贡献1810条经验 获得超4个赞
$("div .map-inner").each(function(index, element) {
var AllOrderItems = new Array();
$($(this).find('.route-item')).each(function(index, element) {
AllOrderItems.push($(this).find('.orderItemID').val());
})
var MapContainer = {
DriverName: $(this).find('.driver-name').text(),
TotalDistance: $(this).find('.total-km').text(),
TotalTime: $(this).find('.total-time').text(),
LicensePlate: $(this).find('.vehicle-number').text(),
OrderItems: AllOrderItems
}
AllMaps.push(MapContainer);
})
- 2 回答
- 0 关注
- 90 浏览
添加回答
举报