摘要:
群里有个人问这么判断一个对象是Element?我查了下//underscore.js的实现 _.isElement = function(obj) { return !!(obj && obj.nodeType == 1); };//valentine.js的实现 , ele: function (el) { return !!(el && el.nodeType && el.nodeType == 1) }//prototype.js的实现isElement: function(object) { return object && 阅读全文