$.extend({
StandardPost:function(url,args){
var body = $(document.body),
form = $("<form method='post'></form>"),
input;
form.attr({"action":url});
$.each(args,function(key,value){
input = $("<input type='hidden'>");
input.attr({"name":key});
input.val(value);
form.append(input);
});
form.appendTo(document.body);
form.submit();
document.body.removeChild(form[0]);
}
});
本文转自 yntmdr 51CTO博客,原文链接:http://blog.51cto.com/yntmdr/1859772,如需转载请自行联系原作者