废话不多少,直接上代码:
JS部分:
function addEvent(obj, evtType, func, cap) { cap = cap || false; if (obj.addEventListener) {