Two cloning methods of Ext: You can clone objects, data, etc.: var newJson = Ext.clone(json);
You can only clone arrays: var newJson = Ext. Array.clone(json);
JQuery method: Deep copy [can be iterated]: var newJson = jQuery.extend(true,{}, json) ;
Shallow copy [cannot iterate]: var newJson = jQuery.extend({}, json);
var newJson = $.map(json,function (n) { return n; });
Clone method of array:
var newJson = json.concat();
var newJson = json.splice(0);
The above methods all copy a new one Object or array, but if you directly access the object of the parent window through parent [iframe situation], there will be problems [there is a reference relationship]. It should be noted that you can change the method of fetching to the method of passing data.