Js判断是否改动

old_json.File.fileName = list.File[i].Name;
old_json.File.filePath = list.File[i].Path;
delete old_json.File.isDele;
delete old_json.File.CreatTime;

data_result.File.fileName = list.File[i].Name;
data_result.File.filePath = list.File[i].Path;
if (JSON.stringify(data_result.File).replace(/s*/g, "").split('').sort().toString() == JSON.stringify(old_json.File).replace(/s*/g, "").split('').sort().toString()) {
alert("没有改动!");
}
View Code
原文地址:https://www.cnblogs.com/kongxp/p/7161017.html