when checkbox are checked for each checkbox jquery create input
How can I get all inputs with name??

if checkbox checked create input:

```
    <script>
function dynInput(cbox) {
    if (cbox.checked) {
        var input = document.createElement("input");
        input.type = "text";
        input.className = "cbox";
        var div = document.createElement("div");
        div.className = "cbox-div";
        div.id =  cbox.name;
        div.innerHTML =cbox.name;

        div.appendChild(input);
        document.getElementById("insertinputs").appendChild(div);
    } else {
        document.getElementById(cbox.name).remove();
    }
}</script>

```

checkbox and Inputs:

```
      <form class="add-item">
          <input type="checkbox"  onclick="dynInput(this);"  name="1"> 1<br>
          <input type="checkbox"  onclick="dynInput(this);"  name="2"> 2<br>
          <input type="checkbox"  onclick="dynInput(this);"  name="3"> 3<br>
          <input type="checkbox"  onclick="dynInput(this);"  name="4"> 4<br>
      </form>
      <p id="insertinputs"></p>

```

I can only get first Input value :

```
    var item = $(".cbox").val();

    console.log(item);

```