Checkbox Selector Example
RUN
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>all demo</title> <style> textarea { height: 35px; } div { color: red; } fieldset { margin: 0; padding: 0; border-width: 0; } .marked { background-color: yellow; border: 3px red solid; } </style> <script src="https://freetuts.net/cnd/js/jquery/jquery-3.2.1.min.js"></script> </head> <body> <h1>Học lập trình miễn phí tại freetuts.net</h1> <fieldset> <input type="button" value="Input Button"> <input type="checkbox"> <input type="checkbox"> <input type="file"> <input type="hidden"> <input type="image"> <input type="password"> <input type="radio"> <input type="reset"> <input type="submit"> <input type="text"> <select> <option>Option</option> </select> <textarea></textarea> <button>Button</button> </fieldset> <button onclick="myFunction()">Click vào đây để xem kết quả</button> <script> function myFunction(){ var input = $( "input:checkbox" ) .wrap( "<span></span>" ) .parent() .css({ background: "yellow", border: "3px red solid" }); } </script> </body> </html>
PHÓNG TO