Port to CoffeeScript from http://code.google.com/p/form-serialize/ with bugfixes.
- CoffeeScript
- Javascript 1836B (100%)
- Minified 1147B (62%)
- Packed 1009B (54%)
<form action="" method="get">
<input type="text" name="fullname" value="James Bond" />
<input type="text" name="email" value="email@example.com" />
</form>
var form = document.getElementsByTagName('form')[0];
var serialized = serialize(form); // fullname=James%20Bond&email=email%40example.com