代码如下: document.onclick = function(e) { var o = window.event.srcElement; if (o.tagName=="A") { alert("这里放你的处理代码!") } } script>