var myPost = function(url,args,ajax_form_options){ var body = $(document.body),form = $(""),input; form.attr({"action":url}); for(var key in args){ input = $(""); input.attr({"name":key}); input.val(args[key]); form.append(input); } form.appendTo(document.body); form.ajaxSubmit(ajax_form_options); document.body.removeChild(form[0]);}var ajax_form_options = { success : function(data) { //成功的回调函数 }} var url = '/xxx/xxx/xxx';var param = {'xxx' : xxx};myPost(url,param,ajax_form_options);需要引入jquery-1.7.2.min.js和jquery-form.js