jQuery Form Observe
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/form-observe
软件介绍
Overview
This plugin observes values of form elements.
When end-user changes any values of input elements, observer shows which values were changed. And observer also alerts to users when they try to move out from the page before submitting changes.
Usage
You can add FormObserve plugin onto any form element.
$(document).ready(function(){
$('#MyForm').FormObserve();
});
<form id="MyForm">
<input type="text" value="here's default value" />
<input type="submit" value="save" />
</form>If you want to show users the changes, you can add the definition of class 'changed'.
<style>
.changed {
background-color: red;
}
</style>After changes have been completed (might be 'onsubmit', 'ajax complete' and so on), you should call FormObserve_save() method.
$('#MyForm').submit(function(){
if(validation=='ok'){
$(this).FormObserve_save();
}
});Options
changeClass
You can change the class name of changed input-elements.
$(document).ready(function(){
$('#MyForm').FormObserve({changeClass: "alert-color");
});Default value is 'changed'.
msg
You can set the alert message.
Default value is "Unsaved changes will be lost.\nReally continue?"
Tips
You can call FormObserve_save() method to each elements.
$('#ajax-button').click(function(){
// after saving on server
$(this).FormObserve_save();
});This plugin is very handy using with jGlycy.
<form jg="FormObserve">
<input type="text" value="here's default value" />
<input type="submit" value="save" />
</form>付费:互联网知识经济的兴起
方军 / 机械工业出版社 / 2017-6-1 / CNY 59.00
关于互联网知识付费的首部作品 知识工作正在被重塑,知识经济正在开启互联网时代下半场 为你展现互联网知识经济全景大图,解读新物种的前世今生 内容简介 一个产业解读 三个分析工具 一组知识卡片 书是最早的知识载体,已有2000多年的付费历史,随着移动互联网的普及,新的知识经 济在今天爆发,知识的创造者和传播者从书后走到了书前,互联网知识经济正在拉开帷幕。知识的......一起来看看 《付费:互联网知识经济的兴起》 这本书的介绍吧!
