i created this for you, it is not the most elegant solution but it works
JS:
<script>
$(document).ready(function (d) {
/* set initial value to "" (empty string), and not null
we're going to use this to check if the value of the current text field has been changed */
val = '';
setInterval(function () {
if (val !== $('textarea[name="checktext"]').val()) {
// Value is not the same, fire action
alert('val is different');
// Update the current value
val = $('textarea[name="checktext"]').val();
} else {
// Val is the same as textarea value
}
}, 50);
});
</script>
HTML:
<textarea name="checktext"></textarea>
this script will work only for that specific textarea, you can change that or you can set the val to be an array of text inputs.
i'm just showing you the idea behind it, to use setInterval of x milliseconds to check if the value of the text input is the same as the value of the val or whatever variable name you want to use. if they don't match then it means it has been changed, if they match then it means nothing has changed.
i hope you find this useful.
However HTML5 has the solution
<script>
$(document).ready(function (d) {
$('textarea[name="checktext"]').on('input', function () {
alert('changed');
});
});
</script>