我如何知道表格是否被修改 [英] How do I know if a form has been modified

查看:94
本文介绍了我如何知道表格是否被修改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否仍然可以检查表单是否已修改.

I Would like to know if there is anyway I can check if a form has been modified.

例如如果其中一项输入已更改,我想显示一个按钮来提交更改.

eg. If one of the inputs has been changed I would like to display a button to submit the changes.

推荐答案

JQuery有一个更改"事件.所以做类似的事情:

There's a "change" event with JQuery. So doing something like :

$(document).ready(function() {
    $('form').change(function() {
        # Here you display your button
    }
}

可以完美运行(并且您的JavaScript仍然独立于html).

Will perfectly work (and your javascript remains independant from your html).

这篇关于我如何知道表格是否被修改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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