开发者

Compare current values of controls with page load values on keypress

开发者 https://www.devze.com 2023-03-20 19:19 出处:网络
I have an aspx page which contains a no. of div with varying no. of controls. and evey div is开发者_Python百科 visible through a tab menu i.e. on clicking of a tab in menu a div is made visible or fal

I have an aspx page which contains a no. of div with varying no. of controls. and evey div is开发者_Python百科 visible through a tab menu i.e. on clicking of a tab in menu a div is made visible or false. Now for my requirement I want to check if a user has made some changes in the foem fields and if it changes any of the field, a message should be displayed showing "Your changes have not been saved". How can I accompalish this if you could guide me please.

Thanks in advance.


var formChanged = false;

// doc ready
$('#formId').change(function(){
    formChanged = true;
});
0

精彩评论

暂无评论...
验证码 换一张
取 消