<html> <head> <title>The Selector Example</title> <script type = "text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script> <script type = "text/javascript" language = "javascript"> $(document).ready(function() { /* Selects the visible <li> element..*/ $(":input").wrap( "<span></span>" ).parent().css("background-color", "yellow"); $(":input").val("Enter Name."); }); </script> </head> <body> <p>Highlighted Form elements</p> <form> <table> <tr><td>Name</td><td><input type = "text"></td></tr> <tr><td>Password</td><td><input type = "password"></td></tr> <tr><td>Gender</td> <td><input type = "radio" name = "gender" value = "male">Male<br/><input type = "radio" name = "gender" value = "female">Female</td> </tr> <tr><td>Food</td> <td><input type = "checkbox" name = "chinese" value = "chinese" checked>Chinese<br/> <input type = "checkbox" name = "indian" value = "indian">Indian</td> </tr> </table> </form> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more