protectdata jQuery插件
2016-08-23
0 0 0
暂无评分
其他
如何获取积分?
What it is
When a user enters data into a form, it can get lost if he leaves the page or clicks a link (be it ajax or not). Here comes protectData, it asks the user before losing his data by loading another page or submitting an ajax request(optional).
It integrates with jquery.form (so ajaxSubmit and ajaxForm are saved too).
(There is a typo in the current version(thx to timothy) loose vs lose, will be fixed in 0.2)
Examples
``` //basic protection $('form').protectData();
//basic and ajax protection $('form').protectData(); $.protectData.protectAjax = true;
//changing defaults $.protectData.message = "You will lose data if continuing"; //change default message $.protectData.stateChangeCallback = function(isProtected){alert('data
插件
相关源码推荐
文件拦截注册插件
0
0
暂无评分
Validate用户注册表单验证插件
0
0
暂无评分
文件导航插件
1
0
暂无评分
WordPress插件:显示或检索用户所发表的评论。
0
0
暂无评分
aspcms筛选插件
7
0
4.3分
暂无评论