Home  >  Article  >  Web Front-end  >  Getting Started with JQuery - Introduction to Application of Binding Event Handling Functions Using the bind Method_jquery

Getting Started with JQuery - Introduction to Application of Binding Event Handling Functions Using the bind Method_jquery

WBOY
WBOYOriginal
2016-05-16 17:42:10952browse

1. The bind() function is to bind a processing function to the event of each selected element. Its syntax is as follows: bind(type, [data], fn)

Type is one or more types of strings, such as click or change, which can also be customized; types that can be called by type include blur, focus, load, resize, scroll, unload, click, dbclick, mousedown, etc. event. The parameter data is an additional data object passed as the event.data property value. The parameter fn is the handler function bound to the event of each selected element.

2. Sample code :

Copy code The code is as follows:





bind method binding event











3. Preview of renderings:

No response if you click again

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn