Value change monitoring in input

1. This event is triggered when the current property of the input changes, but only for the value change in the input. Support chrome, firefox, etc.

    $('#input').bind('input'function() {   $('#result').html($(this).val());  });  

2. This event is triggered when the current property of propertychange changes. Only IE browser is supported. similar to input

    $('#input').bind('propertychange'function() {   $('#result').html($(this).val());  });  

2. This event is triggered  when the current property changes. There are two conditions

    2.1 blur loses focus

    2.2  Property changes are triggered by keyboard or mouse events (script triggering is invalid)

    $('#input').bind('change'function() {   $('#result').html($(this).val());  });  


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325813961&siteId=291194637