标签:tac 绑定 hang false onclick doc dev asc ant
function panTest(m_onClickFun) { var This = this; This.onClickFun = m_onClickFun; /* This.onClickFun = function () { $(‘#console‘).append("click\n\r"); } */ function AddEvent(element,e,fn) { if(element.addEventListener){ element.addEventListener(e,fn,false); } else { element.attachEvent(‘on‘+e,fn); } } This.listen = document.getElementById(‘listen‘); AddEvent(This.listen,‘click‘,This.onClickFun); } function myClick(){ $(‘#console‘).append("panshangqi\n\r"); } var pan = new panTest(myClick);
标签:tac 绑定 hang false onclick doc dev asc ant
原文地址:http://www.cnblogs.com/mypsq/p/7302495.html