标签:var 移除 children obj lob val tab parent sub
var listItem = "";
$(‘#AddTable tr‘).each(function () {
if ($.trim($(this).children("td:eq(0)").text()) == "移除") {
var pkid = $.trim($(this).children("td:eq(0)").children("#BusinessCategoryId").val());
var EntireCategoryCode = $.trim($(this).children("td:eq(1)").text());
var BizCategoryName = $.trim($(this).children("td:eq(2)").text());
var RiskLevelId = $.trim($(this).children("td:eq(3)").text());
listItem += ‘{"pkid":"‘ + pkid + ‘","Code":"‘ + EntireCategoryCode + ‘","Name":"‘ + BizCategoryName + ‘","RiskLevelId":"‘ + RiskLevelId + ‘",},‘;
}
});
var lists = { "list": "[" + listItem.substring(0, listItem.length - 1) + "]" };
parent.global = lists
if (global != "") {
var dataObj = eval("(" + global.list + ")"); //转换为json对象
for (var i = 0; i < dataObj.length; i++) {
alert(dataObj[i].pkid);
}
}
标签:var 移除 children obj lob val tab parent sub
原文地址:http://www.cnblogs.com/ment/p/7642468.html