Home > Web Front-end > JS Tutorial > Several selectors in JQuery to find elements that meet the conditions $('#controlID')_jquery

Several selectors in JQuery to find elements that meet the conditions $('#controlID')_jquery

WBOY
Release: 2016-05-16 18:03:02
Original
1204 people have browsed it

Style: $(function (){
$("label to be selected").click(function (){alert ("pop-up dialog box content");})
});
First Type: Id selector
Usage:

Copy code The code is as follows:

< head>







First


Second




Note: All

tag clicks will prompt a pop-up dialog box
Second type: CSS selector

Copy code The code is as follows:









No warning< ;/p>

Please take care of your children

Warning you again


< ;input class ="warning " type ="button" value ="Don't click" />


Note: For all CSS styles: .warning click There will be a pop-up dialog box prompt
The third type: multi-condition selector
Copy code The code is as follows:









Computer Hot Sale







Description: Multiple simultaneous selections can be processed.
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