JSFiddle - React, Tailwind, and code Playground
by Academia
HTML
<div id="chkbox_container">
<input type="checkbox" checked="checked" />Check<br />
</div>
<input type="button" value="Add CheckBox" onClick="document.getElementById('chkbox_container').insertAdjacentHTML('beforeend','<input type=\'checkbox\' checked=\'checked\' />Check<br />');">
JavaScript
function addCheckBox() {
txt = "<input type=\"checkbox\" checked>Check<br />";
document.getElementById('chkbox_container').insertAdjacentHTML('beforeend',txt);
}