Javascript examples for jQuery:Form Checkbox
Append text when checkbox is checked
<html> <head> <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> </head> /* w w w. jav a 2 s .c o m*/ <body> <form id="vcardForm" method="post"> <input id="chkbox1" type="checkbox"> <label id="lbl1"></label> <input type="submit" id="submitbtn"> </form> <script> $("#chkbox1").change(function(){ $('#lbl1').text("Checked is "+ this.checked +"!"); }); </script> </body> </html>