非IE不使用window.event的,兼容性资料
http://www.phpchina.com/?1628/action_viewspace_itemid_3742.htmlfirefox开发文档有很多例子
http://developer.mozilla.org/
http://www.phpchina.com/?1628/action_viewspace_itemid_3742.htmlfirefox开发文档有很多例子
http://developer.mozilla.org/
<script>
document.getElementById("testId").onclick=aa;
function aa(e){
e=e||event;
e=e.target||e.srcElement;
alert(e.tagName);
}
</script>
<div id="testId">abcdefg</div>请梅花雪进来接分!也谢谢LSD!
同时感谢liudang帮我一起分析!