var d = {};
var t = $('form').serializeArray();
t.forEach(function(item, index){
d[item.name] = item.value;
});
$.post("a.php",d,function(result){
layer.alert(result,function () {
location.reload();
});
本文转自 IT阿飞 51CTO博客,原文链接:http://blog.51cto.com/itafei/2046640