Jquery selector overview _ jquery-js tutorial

Source: Internet
Author: User
This article mainly summarizes and introduces the jQuery selector. If you need jQuery selector, you can refer to it and hope to help you with jQuery selector to make it easier and more flexible to obtain page elements, this greatly reduces the pressure on developers. Just like building a building, if there is no brick or tile, the building will not be able to be built and the elements will not be available. What are other operations? We can see the importance of the jQuery selector.

The general direction of the jquery selector is as follows:

Next, let's take a look at the general CSS selector of the basic selector:

1. Tag selector:

$ ("Element ")

The element parameter indicates the HTML Tag name to be searched, for example, $ ("p"). The tag selector can efficiently obtain elements because it inherits from getEmelentsByTagName in javascript, it obtains the set of the entire element.

2. ID Selector

$ ("Id ")

The parameter id indicates the id attribute value of the element to be searched. The digit "#" should be added before the parameter id, which is efficient in obtaining elements, because it inherits from getElementById ("") in JavaScript, id is unique in the page and complies with CSS standards.

  ID Selector 

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.