Skip to content

Instantly share code, notes, and snippets.

@leedo
Created February 8, 2011 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leedo/816706 to your computer and use it in GitHub Desktop.
Save leedo/816706 to your computer and use it in GitHub Desktop.
1.7
<?doctype html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script>
<script type="text/javascript">
document.observe("dom:loaded", function() {
$('output').insert($('foo').serialize());
});
</script>
</head>
<body>
<form id="foo">
<select name="foo" multiple>
<option value="bar" selected>bar</option>
<option value="baz" selected>baz</option>
</select>
</form>
<pre id="output"></pre>
</body>
</html>
<?doctype html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script>
<script type="text/javascript">
document.observe("dom:loaded", function() {
$('output').insert($('foo').serialize());
});
</script>
</head>
<body>
<form id="foo">
<select name="foo" multiple>
<option value="bar" selected>bar</option>
<option value="baz" selected>baz</option>
</select>
</form>
<pre id="output"></pre>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment