Question: `<br>` should be added dynamically. I've used the following script.

HTML code

```
<input ...../> 
<input ...../> <br>
<input ...../> 
<input ...../> <br>

```

JS

```
 var mybr = document.createElement('br');
 var inputs = document.getElementsByTagName("input");

 for (var i = 0; i < inputs.length; i++) {
      if (i % 2 == 0) {
           // inputs[i].outerText=inputs[i].outerText+"<br><br>";
            inputs[i].appendChild(mybr);

      }
 }

```

But it doesn't work. Any idea?

Answer: 
youn can replace :

```
inputs[i].appendChild(mybr);

```

by:

```
inputs[i].outerHTML+='<br/>' ;   

```

```html
    <input ...../> 
    <input ...../> <br>
    <input ...../> 
    <input ...../> <br>

<script type="text/javascript">

 var inputs = document.getElementsByTagName("input");
     for (var i = 0; i < inputs.length; i++) {
          if (i % 2 == 0) { 
             inputs[i].outerHTML+='<br/>' ;        
            }
     }
  </script>
```
Replace this line 

```
inputs[i].appendChild(mybr);

```

with (by using Jquery)

```
$(inputs[i]).after(mybr)

```

but if you want to use Javascript I will refer to see [this Answer](https://stackoverflow.com/questions/7258185/javascript-append-child-after-element)