12 2014 档案

摘要:输出5个5function box(){ var arr = []; for(var i=0; i<5; i++){ arr[i] = function(){ return i; }; } return arr;}var b ... 阅读全文
posted @ 2014-12-28 10:01 oceanden 阅读(138) 评论(0) 推荐(0)
摘要://跨浏览器添加事件/*function addEvent(obj, type, fn){ if(typeof obj.addEventListener != 'undefined'){ obj.addEventListener(type, fn, false); }els... 阅读全文
posted @ 2014-12-27 17:10 oceanden 阅读(565) 评论(0) 推荐(0)
摘要:firebug-lite.jsExplorerCanvas excanvas.js // 兼容IEif(typeof window.G_vmlCanvasManager != 'undefined'){ canvas = window.G_vmlCanvasManager.initEl... 阅读全文
posted @ 2014-12-27 17:05 oceanden 阅读(213) 评论(0) 推荐(0)
摘要:/**************************************** 检测是否是数组对象*****************************************/var isArray = Function.isArray || function(o){ retu... 阅读全文
posted @ 2014-12-25 20:03 oceanden 阅读(213) 评论(0) 推荐(0)
摘要:Drag(父类)function Drag(id){ var _this = this; this.disX = 0; this.disY = 0; this.oDiv = document.getElementById(id); this.oDiv.onmousedo... 阅读全文
posted @ 2014-12-07 22:07 oceanden 阅读(163) 评论(0) 推荐(0)