jquery onchange input value

JavaScript
$("input").change(function(){
  alert("The text has been changed.");
});// On element change.
$('mydiv').bind('DOMSubtreeModified', function () {
  console.log('changed');
});function updateInput(ish){
    document.getElementById("fieldname").value = ish;
}
Source

Also in JavaScript: