aspx
var Tbody = $("#PartTable")[0];
var data = [];
for (var i = 0; i < Tbody.rows.length; i++) {
var TempRow = Tbody.rows[i];
data.push({
"OMPKid": TempRow.id,
"Price": $(TempRow).find("div")[0].innerHTML,
"Remark": $(TempRow).find("div")[1].innerHTML == " " ? "" : $(TempRow).find("div")[1].innerHTML
});
}
$("#JsonValue").val(JSON.stringify(data));
cs
var r = JsonConvert.DeserializeObject<List<OutwardProcessingOrderBs>>(JsonValue.Value);
public class OutwardProcessingOrderBs
{
public int OMPKid { get; set; }
public Nullable<double> Price { get; set; }
public string Remark { get; set; }
}
原文:http://www.cnblogs.com/bingguang/p/3826277.html