jQuery textbox.val('xxxx') not causing change to fire?

后端 未结 3 1137
一整个雨季
一整个雨季 2020-12-03 00:26

I have the following jQuery code in place on my page:

var isChanged = false;
$(document).ready(function()
{
    $(\'.change\').change(function() {
        is         


        
3条回答
  •  情话喂你
    2020-12-03 01:19

    According to DOM Level 2 Event Specification:

    The change event occurs when a control loses the input focus and its value has been modified since gaining focus.

    That means that change event is designed to fire on change by user interaction. Programmatic changes doesn't cause this event to be fired.

提交回复
热议问题