`
dch1287
  • 浏览: 123239 次
  • 性别: Icon_minigender_1
  • 来自: 魔都
社区版块
存档分类
最新评论

JavaScript Events and Event Handlers

    博客分类:
  • Web
阅读更多
onAbort - The user aborts the loading of an image
onBlur - form element loses focus or when a window or frame loses focus.
onChange - select, text, or textarea field loses focus and its value has been modified.
onClick - object on a form is clicked.
onDblClick - user double-clicks a form element or a link.
onDragDrop - user drops an object (e.g. file) onto the browser window.
onError - loading of a document or image causes an error.
onFocus - window, frame, frameset or form element receives focus.
onKeyDown - user depresses a key.
onKeyPress - user presses or holds down a key.
onKeyUp - user releases a key.
onLoad - browser finishes loading a window or all of the frames within a frameset.
onMouseDown - user depresses a mouse button.
onMouseMove - user moves the cursor.
onMouseOut - cursor leaves an area or link.
onMouseOver - cursor moves over an object or area.
onMouseUp - user releases a mouse button.
onMove - user or script moves a window or frame.
onReset - user resets a form.
onResize - user or script resizes a window or frame.
onSelect - user selects some of the text within a text or textarea field.
onSubmit - user submits a form.
onUnload - user exits a document.

full article see here: http://www.irt.org/articles/js058/
分享到:
评论

相关推荐

    javascript十个最常用的自定义函数.pdf

    var handlers = this.events[event.type]; // 执行每一个处理函数 for (var i in handlers) { this.$$handleEvent = handlers[i]; if (this.$$handleEvent(event) === false) { returnValue = false; } } ...

    手写DOM事件模型

    const handlers = element._events[eventType]; for (let i = handlers.length - 1; i >= 0; i--) { if (handlers[i] === handler) { handlers.splice(i, 1); } } } } ``` ### 3. 示例应用 在`index.html`...

    javascript权威指南(第六版)

    17.2 Registering Event Handlers 456 17.3 Event Handler Invocation 460 17.4 Document Load Events 465 17.5 Mouse Events 467 17.6 Mousewheel Events 471 17.7 Drag and Drop Events 474 17.8 Text Events 481 ...

    前端开源库-nextgen-events

    传统的事件处理方式包括事件监听器(event listeners)和事件处理程序(event handlers)。然而,随着Web应用复杂性的增加,这种简单的模型往往难以满足需求,尤其是在处理大量事件或需要跨组件通信时。 NextGen ...

    (word完整版)javascript看qq中多事件绑定的执行顺序.doc

    el.attachEvent('on' + type, el._eventHandlers); } } else { // 其他遵循W3C标准的浏览器 el.addEventListener(type, handler, false); } } ``` 上述代码展示了在IE浏览器中如何实现事件处理函数的有序执行...

    IntraWeb v14.0.23 Ultimate for RAD Studio XE-XE5 (x32+x64)

    New Event description tab in IWScriptEvents editor with some valuable information about JavaScript events Modification in TIWBaseForm: ExecuteForm() and GenerateForm() methods were made static (non ...

    module-events-4.2.8.tar.gz_social

    这些交互都需要通过事件监听器(Event Listeners)来捕获,并通过事件处理器(Event Handlers)执行相应的操作。 1. **事件模型**:JavaScript遵循基于DOM(文档对象模型)的事件模型,包括事件冒泡(Bubble)、...

    PDF-WhatIsJavaScriptEvents-英文版.rar

    1. **事件处理程序(Event Handlers)** - 事件处理程序是JavaScript中处理事件的函数。你可以将它们绑定到HTML元素,当特定事件发生时,这些函数会被调用。 - 有多种方式设置事件处理程序:`addEventListener`、`...

    Javascript 中文帮助

    8. **事件处理程序(Event Handlers)**: 将函数绑定到特定事件,当事件发生时执行。 **面向对象编程** 9. **对象(Objects)**: JavaScript中的核心特性,由属性和方法组成,通过花括号`{}`创建。 10. **构造函数...

    21个JavaScript事件(Events)属性汇总

    JavaScript通过事件处理程序(event handlers)来响应这些事件。事件处理程序通常是函数,它们定义了在事件发生时应该执行的操作。接下来,我们将详细学习21个JavaScript事件属性。 1. onabort:此事件在图像或其他...

    Microsoft SharePoint 2010 Developer Reference

    - **Feature Receivers:** Event handlers that run when features are activated or deactivated. - **Handling FeatureUpgrading Events:** Techniques for managing feature upgrades during SharePoint upgrades...

    JavaScript实现为事件句柄绑定监听函数的方法分析

    var handlers = element.events[type]; if (!handlers) { handlers = element.events[type] = {}; if (element["on" + type]) { handlers[0] = element["on" + type]; } } handlers[handler.$$guid] = ...

    events-app

    9. **事件处理函数(Event Handlers)**:这是包含处理事件逻辑的函数,它们可以是匿名函数,也可以是预先定义好的函数。 10. **事件类型(Event Types)**:JavaScript支持多种事件类型,如`click`、`mouseover`、...

    events-reminder

    2. **事件处理函数(Event Handlers)**:事件监听器中的函数就是事件处理函数。它可以访问事件对象(event object),从中获取事件的相关信息,如事件类型、目标元素等。 3. **事件冒泡与捕获**:在DOM中,事件会...

    js_dompart4_events_exercice1

    5. **事件处理函数(Event Handlers)** 除了使用`addEventListener`,还可以直接在HTML元素上设置事件处理函数,如`onclick`、`onmouseover`等。但这通常不推荐,因为会导致代码与HTML混杂,不利于维护。 6. **...

    js-events

    JavaScript事件处理主要基于DOM(Document Object Model)事件模型,包括两种主要的事件处理方式:事件处理程序(Event Handlers)和事件监听器(Event Listeners)。事件处理程序是将事件处理函数直接绑定到元素上...

    Beginning Microsoft Visual CSharp 2008 Wiley Publishing(english)

    Event Handlers 674 Input Validation 679 State Management 683 Authentication and Authorization 689 Reading and Writing to an SQL Server Database 697 Summary 706 Exercises 707 ...

    原生javascript实现分页效果

    events.forEach(event => { element.addEventListener(event, function(e) { const action = e.target.getAttribute('attr-action'); if (action && handlers[action]) { handlers[action].call(this, { src: e...

    计算机软件-编程源码- 截获OnClick消息.zip

    6. **合成事件(Synthetic Events)**:在React等现代JavaScript库中,为了提供跨浏览器的兼容性和更好的抽象,它们通常会使用合成事件,这是一类模拟原生DOM事件的对象。 7. **回调函数(Callback Functions)**:...

    java7帮助文档

    see Handling Initialization Status With Event Handlers. You now have control of the window decoration style and title of an applet launched from a shortcut or dragged out of the browser; see ...

Global site tag (gtag.js) - Google Analytics