0

你会在下面看到项目。我想在我的“数据”中使用项目。

像这样的东西。

MyItemList : 项目

我如何使用数据中的项目?

var items = checkListBox3.GetSelectedItems();
alert(Array.prototype.map.call(items, function (item) {
return  item.value;
}).join(", "));

var data= {
Something: Something.GetValue(),
//My question here (I want to use above items here like MyList:items)
};

$.ajax({
url: "/Home/MyUrl",
type: "POST",
dataType: "json",
contentType: 'application/json',
data: JSON.stringify(veri),
4

1 回答 1

1

我建议您准确尝试代码中的注释,并使用MyList:items

var data= {
   Something : Something.GetValue(),
   MyList : items
};
于 2013-10-12T08:35:05.460 回答