html onchange fires once code example
Example 1: javascript input onchange get value
var element = document.getElementById("myInput");
element.onchange = function() {
console.log(element.value);
}
Example 2: javascript input value change
function updateInput(ish){
document.getElementById("fieldname").value = ish;
}