Here i'm trying to append some text to an input field but everytime the old value gets replaced with new value.

**HTML**

```
<input type="text" id="taginput" class="input" name="tags">

```

**Javascript**

```
function update(i){
 document.getElementById('taginput').value = i.innerHTML;
  }

```

no jquery please.