<input id="inputDatabaseName" autocomplete='off' onchange="check();"
onkeyup="this.onchange();" onpaste="this.onchange();" oninput="this.onchange();" />
<script>
function check(){
alert("Input box changed");
// Things to do when the textbox changes
}
</script>
Each answer is missing some points, so here is my solution:
$("#input").on("input", function(e) {
var input = $(this);
var val = input.val();
if (input.data("lastval") != val) {
input.data("lastval", val);
//your change action goes here
console.log(val);
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="text" id="input">
<p>Try to drag the letters and copy paste</p>