In web applications, a large amount of Javascript is applied, so code execution efficiency becomes particularly important, that is, performance! To improve JS performance, we should master some basic performance optimization methods and make them
Several important functions related to compatibility 1. Create a XMLHttpRequest Object1 functioncreatexhr () {2 if(typeofXMLHttpRequest! = "undefined") {3 return NewXMLHttpRequest ();//supported by ie7+ and other browsers4}Else
Instance:Remove the event handler for all P elements:$ ("button"). Click (function () { $ ("P"). unbind ();});Definition and Usage:The Unbind () method removes the event handler for the selected element.This method can remove all or the selected
ArticleDirectory
Add controls to a video player
Processing events in Javascript
Release date: 2006-12-26
| Updated on:
Laurence Moroney
Microsoft Corporation
Applicable:
•
Microsoft Silverlight (formerly
C # namespace Daquan detailed tutorialThe System namespace contains basic classes that define data types, events, and event handlers;The System.Data namespace contains namespaces and classes that provide data access capabilities;The System.IO
AddEventListener () and RemoveEventListener () are used to process the specified and delete event handler actions. Both methods are included in all DOM nodes, and they all accept 3 parameters: the name of the event to be processed, the function that
Bind ()
Attaching one or more event handlers to a matching element
Blur ()
Blur event that triggers, or binds a function to a specified element
Change ()
The change event that triggers, or binds a function
JQuery Event HandlingFirst , the binding method of the Ready processor event1 , bind (EventType, data, Hanlder)Creates a function that acts as an event handler for the time type specified on all elements in the matching setParameters:EventType:
In the comprehensible JS event I. Event flowEvent bubbling and event capture are presented by Microsoft and Netscape, respectively, to address the issue of event flow (sequence of events) in the page. id= "outer"> id= "inner" >Click me! P >
41, CurrenttargetThe current DOM element in the event bubbling phase equals this2. DataWhen the currently executing processor is bound, contains optional data to pass to the JQuery.fn.bind$ ("a"). each (function (i) {$ (the). bind (' click ', {index:
Understand JQuery's event binding feature and event namespace mechanism, and write better and more flexible event processing code
Bind () and unbind () in JQuery provide the event binding and cancellation mechanisms, which can bind events supported
JQuery tips and tips
Tips for using JQ:
1. is () method
Checks Matching Element Sets Based on selectors, elements, or jQuery objects. if at least one element matches a given parameter, true is returned. Some small applications are as follows:
list
Method
Description
Bind ()
Attaching one or more event handlers to a matching element
Blur ()
Blur event that triggers, or binds a function to a specified element
Change ()
The change
Method
Description
Bind ()
Attaching one or more event handlers to a matching element
Blur ()
Blur event that triggers, or binds a function to a specified element
Change ()
The change
The events in JavaScript have three knowledge, one is the event flow, the other is the event handler, and the third is the event object. Here is my personal understanding of the three aspects of the content.First, the event flowEvent flow refers to
AddEventListener () and RemoveEventListener () are used to process the specified and delete event handler actions. Both methods are included in all DOM nodes, and they all accept 3 parameters: the name of the event to be processed, the function that
Method
Description
Bind ()
Attaching one or more event handlers to a matching element
Blur ()
Blur event that triggers, or binds a function to a specified element
Change ()
The change
One of the most common requirements in web development is to click inside a div to do something, and click on the page to hide the div elsewhere. For example, many navigation menus, when the menu is expanded, will be asked to click on other non-menu
Method
Description
Bind ()
Attaching one or more event handlers to a matching element
Blur ()
Blur event that triggers, or binds a function to a specified element
Change ()
The change
The event model of the browser
DOM Level NO. 0 Event model
1.Event instance
His properties provide a large amount of information about the triggered events that are currently being processed. This includes details such as which element triggers
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.