日期:2014-05-16 浏览次数:20408 次
document.getElementById('id').onclick = function(e){ e = e || window.event; var target = e.target || e.srcElement; // do something //prevent default action if(typeof e.preventDefault === 'function'){ e.preventDefault(); e.stopPropagation(); }else{ e.returnValue = false; e.cancelBubble = true; } }