share_id += 1; //处理json数据 var img_json = []; if ($("#_hidImgList").val() != "") img_json = eval($("#_hidImgList").val()); var returndata = data.result.Data; returndata['share_id'] = share_id; img_json.push(returndata); $("#_hidImgList").val(JSON.stringify(img_json));
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
var img_json = eval($("#_hidImgList").val()); $.each(img_json, function (n, img_value) { if (img_value) { if (img_value.share_id == id) img_json.splice(n, 1); } }); $("#_hidImgList").val(JSON.stringify(img_json));
简单的post
$.post('/Common/DelRobCargoPost', { "id": _id }, function (data) { if (data) { art.dialog.tips(data.Result); window.location.reload(); } else { art.dialog.tips("数据删除异常"); } });
$.ajax({ type : "post", url : "register/RegisterState", data : "test=" + test, async : false, success : function(data){ data = eval("(" + data + ")"); aDataSet = data; } });