Javascript技术之详尽解析event对象
|
源代码网整理以下描述 源代码网整理以下event代表事件的状态,例如触发event对象的元素、鼠标的位置及状态、按下的键等等。 源代码网整理以下event对象只在事件发生的过程中才有效。 源代码网整理以下event的某些属性只对特定的事件有意义。比如,fromElement 和 toElement 属性只对 onmouseover 和 onmouseout 事件有意义。 源代码网整理以下例子 源代码网整理以下下面的例子检查鼠标是否在链接上单击,并且,如果shift键被按下,就取消链接的跳转。 源代码网整理以下<HTML> 源代码网整理以下下面的例子在状态栏上显示鼠标的当前位置。 源代码网整理以下<BODY onmousemove="window.status = "X=" + window.event.x + " Y=" + window.event.y"> 源代码网整理以下 源代码网整理以下altKey, button, cancelBubble, clientX, clientY, ctrlKey, fromElement, keyCode, offsetX, offsetY, propertyName, returnValue, screenX, screenY, shiftKey, srcElement, srcFilter, toElement, type, x, y 源代码网整理以下-------------------------------------------------------------------------------- 源代码网整理以下1.altKey 源代码网整理以下语法: 源代码网整理以下可能的值: 源代码网整理以下 源代码网整理以下语法: 源代码网整理以下可能的值: 源代码网整理以下这个属性仅用于onmousedown, onmouseup, 和 onmousemove 事件。对其他事件,不管鼠标状态如何,都返回 0(比如onclick)。 源代码网整理以下
|
