-
1. Basic selector.
The basic selector is the most commonly used and simplest selector in jQuery, which looks for DOM elements by their id, class, tag name, etc.
1. ID selector.
ID Description: Match an element according to the given ID and return a single element (Note: ID names cannot be duplicated in web pages).
Example: $("#test"Select. id
For. test
element. 2. Class selector.
class description: Returns a collection of elements that match elements based on the given class name.
Example: $(".test")
Select all elements whose class is test.
3. Element selector.
element
Description: Returns a collection of elements by matching elements based on the given element name.
Example: $("p")
Select all elements.
Description: Matches all elements, returns a collection of elements.
Example: $("*")
Select all elements.
5、selector1,selector2,..Selectorn Description: Merge the elements matched by each selector and return them together, returning the merged element set.
Example: $("p,span,")
Select the set of elements with all and class tags as myclass.
2. Hierarchy selector.
3. Filter selector.
Fourth, the form selector (returns the collection of elements, using similar).
-
33. Introduction to jQuery + selector.
-
33. Introduction to jQuery + selector.
-
There is a difference between this.
1. First of all, the two belong to two different languages, jquery is a framework that belongs to js, then its selector is a selector in js, css is another language different from js, and its selector is css selector, then the two are fundamentally different.
2. But there is an intersection between the two, both are used as web pages or browser parsing languages, and JS can modify or control CSS by modifying the browser's DOM object.
3. You can simply distinguish between the two in this way, CSS selector terms CSS, JS selectors are used in JS, but sometimes the two use the same ID identifier to select objects.
-
In terms of the direction of searching, it seems that there is not much difference.
But in essence, JQ is a library for JS, and CSS is two different languages, and the selectors in JQ are manipulating the DOM and CSS is defining styles
-
css -- > jq.
#idname-->"idname");
classname-->".classname");
These two are the most basic.
-
Three talk about the banquet and the thirteenth, jquery Jane contains the key to introduce the smile + selector.
-
There are a lot of jQuery selectors, probably more than 10.
-
33. Introduction to jQuery + selector.
Let's take a JSON example;
1. What are the benefits of using json, for example, your ** uses text, and you need to split and other processing after returning; >>>More
Recommended Card Master, Son of the Stars, Wild Huntress, Clockwork Spirit, Frost Witch. >>>More
The first is the system-recommended free attack pattern.
It's easy to get started, but the disadvantage is also very big, that is, when you make up the knife, you will continue to lock the opponent's hero and automatically chase people, resulting in mistakes. And the most disgusting thing is that when there is still a trace of blood left in the tower of the locals, they attack the enemy hero by default, but the tower is not demolished, not to mention, and the other party will be killed under the tower, and a head will be given away in vain. When I was a newbie, I was unloaded several times by this pit. >>>More
using systme;
using ; >>>More
It's a big topic, let's talk about my own experience:
The optimization problem in mathematical modeling is a typical type of problem, the main feature is that the method to achieve a certain process or achieve a certain result is not unique, but the cost of different methods is different, and the optimization problem is to find the method with the least cost. So simply put, the purpose of an optimization problem is to find the best way to implement it. >>>More