What's the best way to add HTML dynamically with JQuery?
问题 I have the following HTML: <div id="dynamicRadioButtons"> </div> Using jQuery I'd like to append a radio button with corresponding label to the above div. An example of the HTML I'd like to append is as follows: <input type="radio" id="dynamicRadio" name="radio" /><label for="dynamicRadio">My Label</label> <br> So, lets say I have a function that's called when I click something and takes the parameters id (which is the id of the radio button to be created) and labelText (which is the text of