Home > Article > Web Front-end > Summary of methods for obtaining id values in jquery_jquery
eq(0) takes the first jq element. . .
eq(index)
matches an element with a given index value
Matches a single element by its index.
Return value
Element
Parameter
index (Number): counting from 0
Example
Find the second row
HTML code:
Value 1 |
Value 2< /td> |
jQuery code:
Result:
Get values of different ids
aaa,
bbb,
ccc,
ddd,
eee,
This will get all the ids you want:
0_1
0_2
0_3
0_4
0_5
Text box, text area:
Multiple selection box checkbox: