Detecting data changes in forms using jQuery

后端 未结 10 2038
遇见更好的自我
遇见更好的自我 2020-12-05 13:27

I\'m using ASP.NET 2.0 with a Master Page, and I was wondering if anyone knew of a way to detect when the fields within a certain

or fieldset<
10条回答
  •  感动是毒
    2020-12-05 14:27

    A simple and elegant solution (it detects form elements changes in real time):

    var formChanged = false;
    
    $('#my-div form').on('keyup change paste', 'input, select, textarea', function(){
        formChanged = true;
    });
    

提交回复
热议问题