javascript事件;event对象的属性
2009-12-18 17:32
218 查看
javascript事件列表解说 | |||
事件 | 浏览器支持 | 解说 | |
一般事件 | onclick | IE3、N2 | 鼠标点击时触发此事件 |
ondblclick | IE4、N4 | 鼠标双击时触发此事件 | |
onmousedown | IE4、N4 | 按下鼠标时触发此事件 | |
onmouseup | IE4、N4 | 鼠标按下后松开鼠标时触发此事件 | |
onmouseover | IE3、N2 | 当鼠标移动到某对象范围的上方时触发此事件 | |
onmousemove | IE4、N4 | 鼠标移动时触发此事件 | |
onmouseout | IE4、N3 | 当鼠标离开某对象范围时触发此事件 | |
onkeypress | IE4、N4 | 当键盘上的某个键被按下并且释放时触发此事件. | |
onkeydown | IE4、N4 | 当键盘上某个按键被按下时触发此事件 | |
onkeyup | IE4、N4 | 当键盘上某个按键被按放开时触发此事件 | |
页面相关事件 | onabort | IE4、N3 | 图片在下载时被用户中断 |
onbeforeunload | IE4、N | 当前页面的内容将要被改变时触发此事件 | |
onerror | IE4、N3 | 出现错误时触发此事件 | |
onload | IE3、N2 | 页面内容完成时触发此事件 | |
onmove | IE、N4 | 浏览器的窗口被移动时触发此事件 | |
onresize | IE4、N4 | 当浏览器的窗口大小被改变时触发此事件 | |
onscroll | IE4、N | 浏览器的滚动条位置发生变化时触发此事件 | |
onstop | IE5、N | 浏览器的停止按钮被按下时触发此事件或者正在下载的文件被中断 | |
onunload | IE3、N2 | 当前页面将被改变时触发此事件 | |
表单相关事件 | onblur | IE3、N2 | 当前元素失去焦点时触发此事件 |
onchange | IE3、N2 | 当前元素失去焦点并且元素的内容发生改变而触发此事件 | |
onfocus | IE3 、N2 | 当某个元素获得焦点时触发此事件 | |
onreset | IE4 、N3 | 当表单中RESET的属性被激发时触发此事件 | |
onsubmit | IE3 、N2 | 一个表单被递交时触发此事件 | |
滚动字幕事件 | onbounce | IE4、N | 在Marquee内的内容移动至Marquee显示范围之外时触发此事件 |
onfinish | IE4、N | 当Marquee元素完成需要显示的内容后触发此事件 | |
onstart | IE4、 N | 当Marquee元素开始显示内容时触发此事件 | |
编辑事件 | onbeforecopy | IE5、N | 当页面当前的被选择内容将要复制到浏览者系统的剪贴板前触发此事件 |
onbeforecut | IE5、 N | 当页面中的一部分或者全部的内容将被移离当前页面[剪贴]并移动到浏览者的系统剪贴板时触发此事件 | |
onbeforeeditfocus | IE5、N | 当前元素将要进入编辑状态 | |
onbeforepaste | IE5、 N | 内容将要从浏览者的系统剪贴板传送[粘贴]到页面中时触发此事件 | |
onbeforeupdate | IE5、 N | 当浏览者粘贴系统剪贴板中的内容时通知目标对象 | |
oncontextmenu | IE5、N | 当浏览者按下鼠标右键出现菜单时或者通过键盘的按键触发页面菜单时触发的事件 | |
oncopy | IE5、N | 当页面当前的被选择内容被复制后触发此事件 | |
oncut | IE5、N | 当页面当前的被选择内容被剪切时触发此事件 | |
ondrag | IE5、N | 当某个对象被拖动时触发此事件 [活动事件] | |
ondragdrop | IE、N4 | 一个外部对象被鼠标拖进当前窗口或者帧 | |
ondragend | IE5、N | 当鼠标拖动结束时触发此事件,即鼠标的按钮被释放了 | |
ondragenter | IE5、N | 当对象被鼠标拖动的对象进入其容器范围内时触发此事件 | |
ondragleave | IE5、N | 当对象被鼠标拖动的对象离开其容器范围内时触发此事件 | |
ondragover | IE5、N | 当某被拖动的对象在另一对象容器范围内拖动时触发此事件 | |
ondragstart | IE4、N | 当某对象将被拖动时触发此事件 | |
ondrop | IE5、N | 在一个拖动过程中,释放鼠标键时触发此事件 | |
onlosecapture | IE5、N | 当元素失去鼠标移动所形成的选择焦点时触发此事件 | |
onpaste | IE5、N | 当内容被粘贴时触发此事件 | |
onselect | IE4、N | 当文本内容被选择时的事件 | |
onselectstart | IE4、N | 当文本内容选择将开始发生时触发的事件 | |
数据绑定 | onafterupdate | IE4、N | 当数据完成由数据源到对象的传送时触发此事件 |
oncellchange | IE5、N | 当数据来源发生变化时 | |
ondataavailable | IE4、N | 当数据接收完成时触发事件 | |
ondatasetchanged | IE4、N | 数据在数据源发生变化时触发的事件 | |
ondatasetcomplete | IE4、N | 当来子数据源的全部有效数据读取完毕时触发此事件 | |
onerrorupdate | IE4、N | 当使用onBeforeUpdate事件触发取消了数据传送时,代替onAfterUpdate事件 | |
onrowenter | IE5、N | 当前数据源的数据发生变化并且有新的有效数据时触发的事件 | |
onrowexit | IE5、N | 当前数据源的数据将要发生变化时触发的事件 | |
onrowsdelete | IE5、N | 当前数据记录将被删除时触发此事件 | |
onrowsinserted | IE5、N | 当前数据源将要插入新数据记录时触发此事件 | |
外部事件 | onafterprint | IE5、N | 当文档被打印后触发此事件 |
onbeforeprint | IE5、N | 当文档即将打印时触发此事件 | |
onfilterchange | IE4、N | 当某个对象的滤镜效果发生变化时触发的事件 | |
onhelp | IE4、N | 当浏览者按下F1或者浏览器的帮助选择时触发此事件 | |
onpropertychange | IE5、N | 当对象的属性之一发生变化时触发此事件 | |
onreadystatechange | IE4、N | 当对象的初始化属性值发生变化时触发此事件 |
Abstract | Returns the Abstract content in an Advanced Stream Redirector (ASX) file 用 event 对象获取高级流重定向器(ASX)文件中项目横幅的 Abstract 内容。 |
altKey | Sets or returns a Boolean value that indicates the state of the ALT key 设置或获取 Alt 键的状态。 |
altLeft | Returns a Boolean value that indicates the state of the left ALT key 设置或获取左 Alt 键的状态。 |
banner | Returns the Banner content in an ASX file 使用 event 对象获取高级流重定向器(ASX)文件中项目的 Banner 内容。 |
button | Sets or returns the mouse button pressed by the user 设置或获取用户所按的鼠标按钮。 0 - Default. No button pressed 默认。没有按钮被按 1 - Left button pressed 左按钮被按了 2 - Right button pressed 右按钮被按了 3 - Left and right buttons pressed 左和右按钮被同时按了 4 - Middle button pressed 中间的按钮被按了 5 - Left and middle buttons pressed 左和中这俩按钮被按了 6 - Right and middle buttons pressed 右和中这俩按钮被按了 7 - All three buttons are pressed 所有三个按钮同时被按 firefox(版本2.0) 点击鼠标左中右键, event.button的值分别为0,1,2 IE(版本6) 点击鼠标左中右键, event.button的值分别为 1,2,4 参见:http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-MouseEvent |
cancelBubble | Sets or returns a Boolean value that indicates whether or not the current event should bubble up the hierarchy of event handlers 设置或获取当前事件是否要在事件句柄中向上冒泡。 |
clientX | Sets or returns the x-coordinate of the mouse pointer - relative to the screen, excluding decorations and scroll bars 设置或获取鼠标指针位置相对于窗口客户区域的 x 坐标,其中客户区域不包括窗口自身的控件和滚动条。 |
clientY | Sets or returns the y-coordinate of the mouse pointer - relative to the screen, excluding decorations and scroll bars 设置或获取鼠标指针位置相对于窗口客户区域的 y 坐标,其中客户区域不包括窗口自身的控件和滚动条。 |
contentOverflow | 获取表明文档处理当前 LayoutRect 对象后是否包含附加的内容。 |
ctrlKey | Sets or returns a Boolean value that indicates the state of the CTRL key 设置或获取 Ctrl 键的状态。 |
ctrlLeft | Sets or returns a Boolean value that indicates the state of the left CTRL key 设置或获取左 Ctrl 键的状态。 |
dataFld | Sets or returns the data column affected by the oncellchange event 设置或获取 oncellchange 事件影响的数据列。 |
fromElement | Sets or returns the object from which activation or the mouse pointer is exiting during the event 设置或获取事件发生时激活或鼠标将要离开的对象。 |
keyCode | Sets or returns the UNICODE of the key pressed 设置或获取与导致事件的按键关联的 Unicode 按键代码。 |
MoreInfo | Returns the MoreInfo content in an ASX file 通过 event 对象获取高级流重定向器(ASX)文件中项目横幅的 MoreInfo 内容。 |
nextPage | Returns the position of the next page within a print template 获取打印模板中下页的位置。 |
offsetX | Sets or returns the x-coordinate of the mouse pointer relative to the object firing the event 设置或获取鼠标指针位置相对于触发事件的对象的 x 坐标。 |
offsetY | Sets or returns the y-coordinate of the mouse pointer relative to the object firing the event 设置或获取鼠标指针位置相对于触发事件的对象的 y 坐标。 |
propertyName | Sets or returns the name of the property that has changed on the object 设置或获取对象上发生更改的属性名称。 |
qualifier | 设置或获取由数据源对象提供的数据成员的名称。 |
reason | Sets or returns the result of a data transfer for a data source 设置或获取数据源对象的数据传输结果。 0 - Successfully 成功的 1 - Aborted 放弃的 2 - Error 错误的 |
recordset | Sets or returns a reference to the default record set in a data source 从数据源对象设置或获取对默认数据集的引用。 |
repeat | Returns a Boolean value that indicates whether the ONKEYDOWN event is being repeated 获取 onkeydown 事件是否正在重复。 |
returnValue | Sets or returns the return value from an event 设置或获取事件的返回值。 |
saveType | Returns the clipboard type when ONCONTENTSAVE fires 当 oncontentsave 触发时获取剪贴板类型。 |
screenX | Sets or returns the x-coordinate of the mouse pointer - relative to the screen 设置或获取获取鼠标指针位置相对于用户屏幕的 x 坐标。 |
screenY | Sets or returns the y-coordinate of the mouse pointer - relative to the screen 设置或获取鼠标指针位置相对于用户屏幕的 y 坐标。 |
shiftKey | Returns a Boolean value that indicates the state of the SHIFT key 设置或获取 Shift 键的状态。 |
shiftLeft | Returns a Boolean value that indicates the state of the left SHIFT key 设置或获取左 Shift 键的状态。 |
srcElement | Sets or returns the object that fired the event 设置或获取触发事件的对象。 |
srcFilter | Sets or returns the filter object that fired the ONFILTERCHANGE event 设置或获取触发 onfilterchange 事件的滤镜对象。 |
srcUrn | Sets or returns the Universal Resource Name (URN) of the behavior that fired the event 获取触发事件的行为的统一资源名称(URN)。 |
toElement | Sets or returns a reference to the object toward which the user is moving the mouse pointer 设置或获取用户要将鼠标指针移动指向的对象的引用。 |
type | Sets or returns the event name 从 event 对象中获取事件名称。 |
wheelDelta | Returns the distance and the direction the wheel button has rolled 设置或获取滚轮按钮滚动的距离和方向。 |
x | Sets or returns the x-coordinate (in px) of the mouse pointer - relative to a relatively positioned parent element 设置或获取鼠标指针位置相对于父文档的 x 像素坐标。 |
y | Sets or returns the y-coordinate (in px) of the mouse pointer - relative to a relatively positioned parent element 设置或获取鼠标指针位置相对于父文档的 y 像素坐标。 |
相关文章推荐
- javascript事件;event对象的属性
- 21个JavaScript事件(Events)属性汇总
- 29-JavaScript-事件-事件驱动-更改外部css属性-区分浏览器内核
- JavaScript事件编程入门案例和对对象属性的遍历
- JavaScript事件event对象属性
- IE8 添加href=javascript:;和click事件,响应完click事件后会导致页面离开,解决方案是去掉href属性
- javascript事件——event对象
- javaScript事件学习小结(四)event的公共成员(属性和方法)
- JavaScript window.document的属性、方法和事件小结
- 21个JavaScript事件(Events)属性汇总
- 29、JavaScript的event对象和事件冒泡
- JavaScript对象、属性、事件手册集合方便查询
- 在javascript中使用(读取、设置)Asp.net服务器的属性、方法和事件
- JavaScript之DOM-8 Event对象(事件概述、事件处理、event对象)
- JavaScript window.document的属性、方法和事件小结
- javascript-Event对象事件
- JavaScript控制各种浏览器全屏模式的方法、属性和事件介绍
- [转] JavaScript 动态添加表格/动态添加事件/态设置属性
- JavaScript控制各种浏览器全屏模式的方法、属性和事件介绍
- 这么详细的分类 JavaScript 源代码网站你见过没有? JavaScript 中的每一个方法,每一个操作,每一个函数,每一个类.每一个属性,每一个事件都有相应的范例代码