javascript代码段:
//<!--提交数据-->
function btsubmit_click() {
var data = "{'record':[";
//循环生成data传到后台
$("." + tby + tday).not(":first").each(function () {
data = data + "{'id':'" + $(this).prevAll(".itemd").find(".hid_id").val() + "','value':'" + $(this).find(".txt" + tday).val() + "'},";
if ($(this).prevAll(".target").text() == "") {
return false;
}
})
data = data.substring(0, data.length - 1) + "]}";
$.ajax({
type: "Post",
url: "Asset.aspx/submits",
data: data,
dataType: "json",