Getting started with JQuery -- bind an event handler function using the bind method-jquery-js tutorial

Source: Internet
Author: User
The bind () function is used to bind processing functions to events of each selected element. If you are interested, you can understand its syntax bind (type, [data], fn ), the parameter data is used as the event. the data property value transmits additional data objects of objects. I hope this will help you to learn more. 1. bind () functionBind a handler for each event of the selected element. The 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, and mousedown. The parameter data is an extra data object that is passed as the event. data property value. The fn parameter is the processing function bound to the event of each selected element.

2. Sample Code:

The Code is as follows:






Bind method binding event

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.