$("input").change(function(){
alert("The text has been changed.");
});
var inputs = document.querySelectorAll( "input" );
for ( var i = 0; i < inputs.length; ++i ) {
inputs[ i ].addEventListener( 'change', function() {
alert("The text has been changed.");
});
}
document.querySelector( "input" ).addEventListener( 'change', function() {
alert("The text has been changed.");
});