摘要:
var elem = document.getElementById("test"); elem.addEventListener("click",aa,false); //click 代表的是事件, aa代表事件触发执行的函数 function aa(){ alert("aa"); } 阅读全文
posted @ 2017-11-08 23:17
halo-漾
阅读(5308)
评论(0)
推荐(0)
摘要:
var button = { clicked:false, click: function(){ this.clicked = true; assert(button.clicked,"the button has been clicked"); } }; button["click"](); //... 阅读全文
posted @ 2017-11-08 23:14
halo-漾
阅读(255)
评论(0)
推荐(0)
摘要:
function bind(context,name){ return function(){ return context[name].apply(context,arguments); } } 阅读全文
posted @ 2017-11-08 23:13
halo-漾
阅读(133)
评论(0)
推荐(0)

浙公网安备 33010602011771号