please tell me how to add br tag or new line between input tag with file type. my html
<input type="button" class="btn btn-outline-success form-control mr-sm-2" style="margin-left: 90%;" id="addPicture" value="Add Picture" onclick="addPicture();"/>
<table id="table_target">
<tbody id="body">
<tr>
<td>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="collapse navbar-collapse" id="browser-first" >
</div>
</nav>
</td>
</tr>
</tbody>
</table>
my js
var i = 1;
function addPicture() {
var img = $('<img />', {
id: 'img' + i,
src: '\assets/img/Rod.png',
width: 300
})
.appendTo($('#table_target'));
var input = $('<input />', {
id: 'browser-first' + i,
type: 'file',
onclick: 'in_first(this)'
})
.appendTo($('#browser-first'));
let imgPreview = document.getElementById("img" + i);
imgPreview.style.margin = '5px';
let inputBtn = document.getElementById("browser-first" + i);
inputBtn.style.marginright = '40px';
if (i % 3 == 0) {
> //i want to add a new line here
// $( "<br />" ).insertAfter( "#browser-first"+i );
// $('#browser-first').val($('#browser-first').val() + '\n\r')
}
i++;
}
I have tried various codes but have not succeeded.


To achieve the desired layout, where every 4th, 7th, etc., input tags appear on a new line, you can insert a
tag after every third input tag. This can be done by modifying the JavaScript function addPicture() you provided.
Here's the adjusted addPicture() function:
In this updated function, when i is a multiple of 3 (meaning after every third input tag), a
tag is inserted after the current input tag. This ensures that the 4th, 7th, etc., input tags will start on a new line.
Remember, the
tag is inserted after the input element. Hence, you need to make sure that the IDs ("browser-first" + i) you're using to insert the
tag after are correct and pointing to the input elements you're adding dynamically. If there are any discrepancies in the IDs or if the elements are nested within other elements, you might need to adjust the selector used in insertAfter().