标签:
$(document).on("click",".btn_small",function(){
var add = document.getElementsByName("add[]");
var del = document.getElementsByName("del[]");
var length = add.length;
var length1= del.length;
var json = {};
var json1 = {};
for(i=0;i<length;i++)
{
json[i]=add[i].value;
//alert(add[i].value);
}
for(ii=0;ii<length1;ii++)
{
json1[ii]=del[ii].value;
//alert(add[i].value);
}
var com_id=$(".companyId").val();
//已经获取到添加的数据如下
var str=JSON.stringify(json);
//已经获取到删除的数据如下
var str1=JSON.stringify(json1);
$.post("index.php?r=company/update11",{
add:str,
del:str1,
com_id:com_id,
},function(b){});
$("#addLabels").attr("style","display:none");
$("li").removeAttr("style");
$("i").remove();
$(".dn").hide();
$("#hasLabels").append(‘<li class="link">编辑</li>‘);
});
标签:
原文地址:http://www.cnblogs.com/jiuweidezhanfang/p/5388428.html