检查 Web 表单值是否已更改 [英] Check if web form values have changed

查看:25
本文介绍了检查 Web 表单值是否已更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个多步骤表单,用户可以导航到任何页面来修改或添加信息.有一个菜单显示当前进度、用户已完成的步骤,并允许导航到任何已完成或待处理的步骤.

I have a multi-step form and user can navigate to any page to modify or add information. There is a menu that shows the current progress, the steps the user has completed, and allows to navigate to any completed or pending step.

尽管有一个大按钮保存并继续",一些用户还是点击了这个菜单来进一步导航.我必须检查 - 表单中的值是否已更改并询问:保存更改?是/否".

In spite of a big button "Save and Continue" some users click this menu to navigate further. I have to check - if values have changed in a form and ask: "Save changes? Yes/No".

您建议我检查表单值是否已更改的最佳方法(使用最少的客户端 JavaScript 代码)是什么?

What is the best way (with minimum client-side JavaScript code) you suggest me to check if form values have changed?

稍后

我忘了说多步骤表单在步骤之间使用回发.

I forgot to tell that the multi-step form uses postback between steps.

推荐答案

jQueryDirty Form"插件可以帮到你:

The jQuery "Dirty Form" plugin may help you out here:

http://plugins.jquery.com/project/dirtyform

这篇关于检查 Web 表单值是否已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆