摘要:
基本方法: function temp(){}; typeof temp == "function" 存在问题: 1、在FireFox中,Html元素对象,也会返回function; 2、在IE中,在Iframe使用中也会出问题; 3、在Safari中,DOM中的NodeList类型也会被识别为function; 兼容方法: function isFunction(fn) { return Object.prototype.toString.call(fn) === "[object Function]"; } 为避免某些对象可能有自己的toStirng 阅读全文
posted @ 2013-01-18 12:49
息壤
阅读(173)
评论(0)
推荐(0)
浙公网安备 33010602011771号