[原创]一个js函数重载功能
摘要:
var _ = { type2string:{}, type:function(s){ return s == null ? 'empty' : (_.type2string[Array.prototype.toString.call(s)] || 'object'); }, defined:function(type,f){ var fn = function(){ var args = Array.prototype.slice.call(arguments); var i = 0, p , f... 阅读全文
posted @ 2012-02-20 18:13 lydiafly 阅读(338) 评论(0) 推荐(0) 编辑