$('form').serializeArray()
// gives
// [ {"name":"foo","value":"1"},
// {"name":"bar","value":"xxx"},
// {"name":"this","value":"hi"} ]
// or
$('form').serialize() // gives : "foo=1&bar=xxx&this=hi"
var fd = new FormData();
fd.append( 'file', input.files[0] );
$.ajax({
url: 'http://example.com/script.php',
data: fd,
processData: false,
contentType: false,
type: 'POST',
success: function(data){
alert(data);
}
});