简体   繁体   English

表单未做任何更改时显示警告框

[英]alert box shown when nothing changes are done in form

when nothing changes is being done in form on which this plugin used and when user exits form it still shows alert box of unsaved changes .so please tell me how to fix this issue so that its alert box only apears when change is being done in the forms .THis is link of that plugin 当使用此插件使用的表单没有进行任何更改时,当用户退出表单时,它仍显示未保存更改的警报框。因此,请告诉我如何解决此问题,以使其警报框仅在更改完成时出现表格.THis是该插件的链接

https://github.com/snikch/jquery.dirtyforms https://github.com/snikch/jquery.dirtyforms

i have used it by using id of particular form 我已经通过使用特定形式的ID来使用它

 $('business-form').dirtyForms();

By default, Dirty Forms attaches event handlers to most anchor tags on the page , and an assumption is made that if one of them is clicked, the user is attempting to navigate from the page. 默认情况下,Dirty Forms 将事件处理程序附加到页面上的大多数锚标记 ,并假设如果单击其中的一个,则用户将尝试从页面导航。

Some 3rd party widgets use anchor tags in their design. 一些第三方小部件在其设计中使用锚标记。 If any of them are causing problematic behavior, you need to ignore them manually by setting the $.DirtyForms.ignoreSelector or adding the ignoreClass to either every anchor within the element or a parent container they are hosted in. 如果它们中的任何一个引起问题,则需要通过设置$.DirtyForms.ignoreSelector或将ignoreClass添加到元素所在的每个锚点或它们所在的父容器中来手动忽略它们。

See Ignoring Things for more information. 有关更多信息,请参见忽略事物

You can view the markup of the widgets using a tool such as FireBug , so you can work out exactly how to ignore anchor tags. 您可以使用FireBug之类的工具查看小部件的标记,因此您可以精确地确定如何忽略定位标记。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM