# events > The interaction between JavaScript and HTML is implemented through events. An event is a specific interaction moment that occurs in a document or browser window, and you can respond to related actions by listening for specific events. * *
off()function is used to remove an event handler for one or more events bound by an element .off()Functions are primarily used to unbind event handlers that are bound by the on () function.The function belongs to an jQuery object
Blur ()Triggers or binds the blur event.$ ("input"). blur (function () {$ ("input"). CSS ("Background-color", "#D6D6FF");});Change ()Triggers or binds a change event, which applies only to text fields (textbox), and to textarea and select elements.$
An event handler provides system interaction for a Web program, but if there are too many event handlers on the page, it can affect the performance of the page. Each function is an object, which consumes memory, and the more objects in memory, the
Programming the contents of this page
EventHandler Delegation
Custom event Arguments
Parameterized custom Events
Summary
This month's content is the final installment of a series of three installments devoted to event programming. In the first two
Recently in-depth practice js, encountered some problems, such as I need to create a dynamic DOM element binding event, then the ordinary event binding is not, so through the Internet to check the data to understand the event delegate, so want to
This article for you to share the JavaScript cross-browser event handling mechanism for your reference, the specific content as follows
cross-browser event handlers
The above is the entire content of this article, I hope to
In most browsers, when an event handler is triggered, the class instance named event is passed into the processor as the first parameter. IE, which has always been dominant, has acted in its own way, saving the event instance to a global attribute
In this chapter, I will explain the best way to register events for elements, that is, to ensure that a specific event occurs on a specific HTML element and can run a specific script. Registering events in the oldest JavaScript browser can only pass
Events is the core of every JavaScript program. What is event processing, what problems it has, and how to write cross-browser code, I will give an overview in this chapter. I will also provide some excellent articles about the details of the event
Introduction to javascript event processing programs. For details about js learning, refer
1. DOM0-level event handlerReturns a function value to an event handler property.
For example:
The Code is as follows:
Var btn = document. getElementById ("
Document directory
No brackets
This
In this chapter, I will explain the best way to register events for elements, that is, to ensure that a specific event occurs on a specific HTML element and can run a specific script.
Registering events in
Attachevent is the IE add event handler, receive two parameters, where the event type name is added "on",Multiple event handlers can be added and triggered in reverse order of addition;AddEventListener is to add an event handler for non-IE, receive
(1) Event Bubblingthe event stream of IE is called event bubbling, where the event starts with the most specific element (the node that is the deepest nesting level in the document) and then propagates up to the less specific node (document).(2)
I. Event handling
Method name
Description
Syntax (events type, data, handler event handler, selector selector)
Bind (
Binds an event handler function for each matching element's specific event (like click).
Transferred from: http://www.cnblogs.com/silence516/archive/2009/09/03/delegateEvent.htmlIf you want to add a bit of JavaScript interactivity to your Web page, you may have heard of JavaScript's event delegation, and think it's one of those puzzling
Event method triggers or adds a function to the event handler of the selected element.The following table lists all the jQuery methods used to handle events.
Method
Description
Bind ()
Adding an event handler to
If you want to add a bit of JavaScript interactivity to your Web page, you may have heard of JavaScript's event delegation, and think it's one of those puzzling design patterns that enthusiast-level JavaScript programmers will care about. In fact,
JQuery Event MethodEvent method triggers or adds a function to the event handler of the selected element.The following table lists all the jQuery methods used to handle events.
Method
Description
Bind ()
Adding
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.