摘要: 在做表单页面的时候,想判断2个js对象,是不是所有完全相同。这里是stackoverflow上的解决办法,在这里记录一下。原文地址: http://stackoverflow.com/questions/1068834/object-comparison-in-javascriptObject.prototype.equals = function(x){ var p; for(p in this) { if(typeof(x[p])=='undefined') {return false;} } for(p in this) { if (this[p]) { ... 阅读全文
posted @ 2013-03-19 10:16 DK亡灵序曲 阅读(294) 评论(0) 推荐(0) 编辑