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

 

posted on 2017-07-13 15:58  胖子略显瘦  阅读(178)  评论(0编辑  收藏  举报