which event raised when set value of input in javascript

when set value of input in javascript which event raised? i tried these event :(propertychange change keypress paste focus textInput input keyup keydown change) for example:

$('input').live/bind/on('which event', function() {
$('input')[0].value = "sd";



When you set the value programmatically no event will be raised. You can raise it yourself though:

$('input')[0].value = "sd";

Or just using jQuery:


You can do something like this. You have to explicitly call change event.

$('input').val('New Value').change();

When a value is changed via a script the change event is not fired, if you want to run a handler then you can trigger the event manually



Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.