script addmore on click function input type file name attach insertBef

1
2
3
4
5
<script>
$('#addmore').on('click', function() {
$('<input type="file" name="attach[]">').insertBefore($("#addmore"));
});
</script>