jQuery | :image Selector
The :image selector is used to select the input elements with type equal to image.
Syntax :
$(":image")
Parameter :
:enabled selector : It is used for selecting HTML input elements for changing the its properties, e.g background-color, etc .
Example 1:
<!DOCTYPE html> <html> <head> <title>:image Selector</title> </script> <script> $(document).ready(function(){ $(":image").css("height", "50px"); }); </script> </head> <body> <center> <form action="#"> <h1>Welcome to GeeksforGeeks!</h1> Image <input type="image" src="logo.png" width="31" height="30"> </form> </body> </html> |
chevron_right
filter_none
Output :
It changes the height of the image :

Example 2:
<!DOCTYPE html> <html> <head> <title>:image Selector</title> </script> <script> $(document).ready(function(){ $(":image").css("width", "150px"); }); </script> </head> <body> <center> <div style="background-color: #ffff94;"> <h1>Welcome to GeeksforGeeks!.</h1> Image<input type="image" src="logo.png" width="31" height="30"> </div> </body> </html> |
chevron_right
filter_none
Output :

Recommended Posts:
- jQuery | :not() Selector
- jQuery | :even Selector
- jQuery | :first Selector
- jQuery | :contains() Selector
- jQuery | #id Selector
- jQuery | :lt() Selector
- jQuery | :last Selector
- jQuery | :gt() Selector
- jQuery | :has() Selector with example
- jQuery | * Selector
- jQuery | :odd Selector
- jQuery | :file Selector
- jQuery | :first-of-type Selector
- jQuery | :nth-of-type() Selector
- jQuery | :password Selector
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



