function addEvent(obj, type, fn) { alert('a'); if (typeof obj.addEventListener != 'undefined') { alert('b'); obj.addEventListener(type, fn, false); } else if (typeof obj.attachEvent != 'undefined') { obj.attachEvent('on' type, fn); alert('c'); } }
无法使用
What error is reported? Ask a question and post the error~