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>有限与无限的游戏
[美]詹姆斯·卡斯 / 马小悟、余倩 / 电子工业出版社 / 2013-10 / 35.00元
在这本书中,詹姆斯·卡斯向我们展示了世界上两种类型的「游戏」:「有限的游戏」和「无限的游戏」。 有限的游戏,其目的在于赢得胜利;无限的游戏,却旨在让游戏永远进行下去。有限的游戏在边界内玩,无限的游戏玩的就是边界。有限的游戏具有一个确定的开始和结束,拥有特定的赢家,规则的存在就是为了保证游戏会结束。无限的游戏既没有确定的开始和结束,也没有赢家,它的目的在于将更多的人带入到游戏本身中来,从而延续......一起来看看 《有限与无限的游戏》 这本书的介绍吧!
