In this script below it counts checkbox checked.
How can I make it count, also add new fields <input type="text">
according to the amount of checked tagged
For example: I marked 5 box, then show 5 fields
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><scripttype='text/javascript'>//<![CDATA[window.onload=function(){varcontador=function(){varn=$("input:enabled:checked" ).length;
$("#checkcount").text( n + (n === 1 ? " é" : " são") + " selecionadoss" );
};
contador();
$( "input[type=checkbox]" ).on( "click", contador );
}//]]>
</script>
<input type="checkbox" name="check1" checked disabled value="1">
<input type="checkbox" name="check1" value="2">
<input type="checkbox" name="check1" value="3">
<input type="checkbox" name="check1" value="4">
<input type="checkbox" name="check1" value="5">
<div id="checkcount"></div>