开发者

Compare current values of controls with page load values on keypress

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜