Question: I want to make input type text refer to user input, if input 3 it shows 3 new input type text

I try this

```
<input type='text' id='how_many'><input type='button' id='add' value='add'>
<script>
       function add(){

          var total=$('#how_many).val();

          for(var x=0;x<=total;x++){
             //HOW TO ADD INPUT TYPE TEXT BELOW 
          }

       }
</script>

```

Answer: 
Probably you are missing '

```
var total=parseInt($('#how_many').val());

for(var x=0;x<=total;x++){
 $("#mainContainer").append("<input type='text'/>");
}

```
Remember to parse your input, then just create:

```
var total= parseInt($('#how_many').val());

for(var x=0;x<=total;x++){
     $("yourcontainer").append("<input type='text' />");
}

```

Trigger the `add()` function on a `blur`

```
$("#how_many").blur(add);

```