jquery-deserialize

Decodes serialized form data and populates a form with that data.

  • 所有者: kflorence/jquery-deserialize
  • 平台:
  • 许可证: GNU General Public License v2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

jQuery.deserialize

$("form").deserialize(data[, options]);

Decodes serialized form data and populates the form with that data. This method works upon text strings in standard URL-encoded notation, arrays containing objects of name/value pairs or objects containing name/value pairs. Thus, the plugin is compatibile with the data collected using the following methods:

Install

Download as NPM module:

npm install jquery-deserialize

Download as Bower component:

bower install jquery-deserialize

Example

Populate a form on page load using query string parameters:

jQuery(function( $ ) {
    $( 'form' ).deserialize( location.search.substr( 1 ) );
});

Arguments

The plugin accepts two arguments: data and options, the latter being optional. Passing the complete() function as the second argument to this plugin is also supported.

  • data String, Array, Object A serialized (and/or encoded) String, an Array of objects containing name/value pairs, or an object of name/value pairs.
  • options Object An object of key/value pairs that configure the plugin.
    • change Function Called for every changed input value.
    • complete Function Called when all of the inputs have been updated.
    • filter String, Function, Element, jQuery A custom filter to identify inputs to deserialize. By default, all inputs that are not disabled will be deserialized (this matches the behavior of serialization).

Requirements

jQuery.deserialize requires:

License

Copyright (c) 2017 Kyle Florence
jQuery.deserialize is dual licensed under MIT and GPLv2 licenses.

主要指标

概览
名称与所有者kflorence/jquery-deserialize
主编程语言JavaScript
编程语言JavaScript (语言数: 2)
平台
许可证GNU General Public License v2.0
所有者活动
创建于2011-04-20 20:14:33
推送于2021-08-27 04:06:15
最后一次提交2021-08-26 23:06:15
发布数19
最新版本名称2.0.0 (发布于 )
第一版名称1.0 (发布于 2011-04-25 14:30:02)
用户参与
星数187
关注者数10
派生数58
提交数95
已启用问题?
问题数28
打开的问题数2
拉请求数12
打开的拉请求数3
关闭的拉请求数6
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?