标签:
<script type="text/javascript">
function mixs (){
var arg = arguments;
var i = 1;
target = arg[0];
for (; i < arg.length;i++) {
var a = arg[i];
for (var key in a) {
target[key] = a[key];
}
}
return target;
}
var json = {username:‘keke‘,password:‘1231‘};
var json2 = {tel:‘13123122‘,username:‘jer‘,password:‘12555‘};
alert(JSON.stringify(mixs(json,json2)));
</script>
标签:
原文地址:http://www.cnblogs.com/qiyc/p/5815379.html