<form> <input name="bar" /> </form> <script> $(function(){ $("input").click(function(){ alert($("form").serialize()); }); }); </script>