只有注册用户登录后才能阅读该文。 阅读全文
摘要:
这篇文章讲了js的内存管理,英文版的https://developer.mozilla.org/en-US/docs/JavaScript/Memory_Management 阅读全文
摘要:
//事件绑定functionMyAddEvent(obj,sEvent,fn){if(obj.attachEvent){obj.attachEvent("on"+sEvent,fn);}else{obj.addEventListener(sEvent,fn,false);};};//事件解除绑定functionremoveMyAddEvent(obj,sEvent,fn){if(obj.detachEvent){obj.detachEvent("on"+sEvent,fn);}else{obj.removeEventListener(sEvent,fn, 阅读全文
该文被密码保护。 阅读全文
摘要:
http://www.admin10000.com/document/1471.html 阅读全文
摘要:
<!DOCTYPE HTML><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><title>用HTML5 Canvas做一个画图板</title><style type="text/css"> body,p{margin:0;padding:0;} .content { display: block; font-size: 14px; ma 阅读全文
摘要:
function isArray(obj){ return Object.prototype.toString.call(obj) == "[object Array]";} 不能用instanceof 和 constructor来判断,原因参考:http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/ 阅读全文