跨浏览器javascript事件捕获
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了跨浏览器javascript事件捕获相关的知识,希望对你有一定的参考价值。
function mouseDown(nsEvent) { // Support Mozilla browsers that use event passing to functions var theEvent = nsEvent ? nsEvent : window.event; var locString = "Screen X = " + theEvent.screenX + " Client X = " + theEvent.clientX + " "; locString += "Screen Y = " + theEvent.screenY + " Client Y = " + theEvent.clientY + " "; if ( theEvent.altKey ) { locString += " - Alt key pressed"; } console.log(locString); }
以上是关于跨浏览器javascript事件捕获的主要内容,如果未能解决你的问题,请参考以下文章