Alert for unsaved changes in form

前端 未结 7 1889
谎友^
谎友^ 2020-11-30 18:47

I want to write Jquery code in master file, so that if there if user changes page and there is any unsaved changes user should get alert. I got one answer from this: link

相关标签:
7条回答
  • 2020-11-30 19:32

    I use $('form').change etc. function to set a dirty bit variable. Not suitable to catch all changes (as per previous answers), but catches all that I'm interested in, in my app.

    0 讨论(0)
提交回复
热议问题