JSFiddle - React, Tailwind, and code Playground
by dmethvin
HTML
<input id="testid" name="tester" value="abc" type="text" />
JavaScript
// #9646 (IE7 only)
// Form-element that is copied gets the copied
// element's name if the name attribute of the
// element to be copied is first accessed.
// *** Remove comment to see the bug ****
//$('#testid').attr("name");
$('#testid')
.clone(true)
.attr("name", function (index, attr) {
return attr + "_copied";
})
.val(function(){
return this.name;
})
.insertAfter('#testid');