8.keyCode
描述:
(请参考 http://www.joyist.com/forum/showtopic.asp?TOPIC_ID=31&Forum_ID=2)
检测键盘事件相对应的内码。
这个属性用于 onkeydown, onkeyup, 和 onkeypress 事件。
语法:
event.keyCode[ = keyCode]
可能的值:
这是个可读写的值,可以是任何一个Unicode键盘内码。如果没有引发键盘事件,则该值为 0 。
9.offsetX
描述:
检查相对于触发事件的对象,鼠标位置的水平坐标
语法:
event.offsetX
10.offsetY
描述:
检查相对于触发事件的对象,鼠标位置的垂直坐标
语法:
event.offsetY
11.propertyName
描述:
设置或返回元素的变化了的属性的名称。
语法:
event.propertyName [ = sProperty ]
可能的值:
sProperty 是一个字符串,指定或返回触发事件的元素在事件中变化了的属性的名称。
这个属性是可读写的。无默认值。
注释:
你可以通过使用 onpropertychange 事件,得到 propertyName 的值。
例子:
下面的例子通过使用 onpropertychange 事件,弹出一个对话框,显示 propertyName 的值。
<HEAD>
<SCRIPT>
function changeProp()
{
btnProp.value = "This is the new VALUE";
}
function changeCSSProp()
{
btnStyleProp.style.backgroundColor = "aqua";
}
</SCRIPT>
</HEAD>
<BODY>
<P>The event object property propertyName is
used here to return which property has been
altered.</P>
<INPUT TYPE=button ID=btnProp onclick="changeProp()"
VALUE="Click to change the VALUE property of this button"
onpropertychange='alert(event.propertyName+" property has changed value")'>
<INPUT TYPE=button ID=btnStyleProp
onclick="changeCSSProp()"
VALUE="Click to change the CSS backgroundColor property of this button"
onpropertychange='alert(event.propertyName+" property has changed value")'>
</BODY>