How does jQuery obtain the id or other information of the currently clicked element on the click Page? _ jquery

Source: Internet
Author: User
Click the page to obtain the id or other information of the currently clicked element. jquery can be used to easily achieve this. The following is a good example and I hope it will be helpful to you. The Code is as follows:


$ (Document). click (function (e ){
Var v_id = require (e.tar get). attr ('id ');
}


The Code is as follows:


Certificate (e.tar get)


The tag name is available for the current element, and the name can be used to control the tag trigger event that you want to click.

Js determines whether the string contains another string

"Ssssddd". indexOf ("ss")> 0
Related Article

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.