Posts

Select input and button elements with type=”reset”

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":reset" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "user" ...

Select input and button elements with type=”submit”

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":submit" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "user"...

Select all input elements with type=”checkbox”

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":checkbox" ). wrap ( "<span style='background-color:red' />" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type =...

Select all input elements with type=”radio”

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":radio" ). wrap ( "<span style='background-color:red' />" );             });         </ script >     </ head >     < body >         < form action = ""> Name: < input type = "text" name = "user" />< br />     ...

Select input elements with type=”password”:

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":password" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "us...

Select input elements with type = “text”

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":text" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "user" ...

Select all input elements: ($(“:input”))

<!DOCTYPE html > < html >     < head >         < script type = "text/javascript" src = "lib/jquery/jquery-1.3.2.js">         </ script >         < script type = "text/javascript">             $ ( document ). ready ( function (){                 $ ( ":input" ). css ( "background-color" , "red" );             });         </ script >     </ head >     < body >         < form action = "">             Name: < input type = "text" name = "user"...