拷贝对象或数组
FUN = {};
FUN.CloneData = function (dataObj) {
var obj = null;
if (typeof dataObj === "object" && Object.prototype.toString.call(dataObj) === '[object Object]') //拷贝对象
{
obj = new Object();
for (var index in dataObj)
{
var data = dataObj[index];
if ((typeof data === "object" && Object.prototype.toString.call(data) === '[object Object]') ||
(Array.isArray(data) || (typeof data === 'object' && Object.prototype.toString.call(data) === '[object Array]'))) {
obj[index] = FUN.CloneData(data);
} else {
obj[index] = data;
}
}
}
else if (Array.isArray(dataObj) || (typeof dataObj === 'object' && Object.prototype.toString.call(dataObj) ===