All Projects → yields → serialize

yields / serialize

Licence: other
serialize a form to urlencoded string.

Programming Languages

javascript
184084 projects - #8 most used programming language

serialize

serialize forms.

Installation

Install with component(1):

$ component install yields/serialize

Example

<input type='text' name='foo' value='baz'>
<input type='text' name='baz' value='foo'>
<select name='select'>
  <option value='1'></option>
</select>

<script>
  var el = document.forms[0];
  assert('foo=baz&baz=foo&select=1' == serialize(el));

  serialize.object(el);
  // => { foo: "baz", baz: "foo", select: "1" }
</script>

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].