Home > Web Front-end > JS Tutorial > A small example of jQuery implementing id fuzzy query_jquery

A small example of jQuery implementing id fuzzy query_jquery

WBOY
Release: 2016-05-16 17:40:14
Original
1488 people have browsed it

eg_1. Find a certain ID picture collection on the page, first put it in the code:

Copy code The code is as follows:



256px; height: 256px">

" style="width: 256px; height: 256px">



Find the img whose id contains "CBS_1" and use $("img[id=^CBS_1]") to get

Copy code The code is as follows:

 


eg_2. For another example, find the div collection of a certain ID on the page and put the code:

Copy code The code is as follows:







;/div>

Find the div whose id contains "div_1" and use $("div[id=^div_1]") to get

Copy code The code is as follows:



ps: The statement is very simple, but it is very practical in browser development tools. This time, we study the row (or column) query for cached image loading (new loading/reading from cache/out-of-range deletion) in the map cacheLayer. , very convenient.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template