jQuery Form Observe

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-13 17:43:22

软件介绍

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>

本文地址:https://codercto.com/soft/d/23307.html

复制互联网之2

复制互联网之2

文飞翔//刘伟 / 清华大学出版社 / 2011-6 / 45.00元

《复制互联网之2:2011年全球最值得模仿的100个网站》从行业的整体发展趋势中,收录了国内外最值得关注的互联网商业模式,为初创网站设计者提供了诸多可供借鉴的最具有启发价值的商业案例。此外,《复制互联网之2:2011年全球最值得模仿的100个网站》对前沿互联网产品的介绍和思考,也值得网站开发人员、产品设计人员及公司管理人员在产品和运营的创新上借鉴与参考。 作者是网易科技频道的编辑,长期致力于......一起来看看 《复制互联网之2》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

MD5 加密
MD5 加密

MD5 加密工具