JSFiddle - React, Tailwind, and code Playground
HTML
<div id="repeatDiv">repeat</div>
<select id = "mySelect">
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
<option value = "10">10</option>
</select>
JavaScript
jQuery("#mySelect").change(function() {
var value = jQuery(this).val();
var $repeatDiv = jQuery("#repeatDiv");
for(var i = 0; i < value; i++) {
$repeatDiv.after($repeatDiv.clone().attr("id", "repeatDiv" + new Date().getTime()));
}
});