I want to type kappa in input on image click. I have this code but it seems like it doesn't work...
document.getElementById("kappa").addEventListener('click', function () {
var text = document.getElementById('usermsg');
text.value = (text.innerHTML + ' kappa ');
});
<a href="#" id="kappa"><img src='http://placehold.it/50x50' width='100px'></a>
<br>
<input type="text" id="usermsg">
Where did I made a mistake? And how can I solve it?