Javascript examples for jQuery:Form Checkbox
Space my checkboxes and the text associated with them
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.5.2.js"></script> <script type="text/javascript"> $(window).load(function(){// w ww. j a va2 s . c om $('button').click(function() { var x = '<input type="checkbox" /> <span>some text</span><br>' $(x).appendTo('body'); }) }); </script> </head> <body> <button>click</button> <br> </body> </html>