有时需要在jQuery中实现同步post请求,而jquery自带的是异步,需要通过JQuery.extend扩展. 支持ie和firefox,方法转载而来.需要在submit前将form.appendTo(document.body),否则无法提交且不会报错 //页面跳转post提交数据 $.extend({ StandardPost:function(url,args){ var body = $(document.body), form = $("<form method='post'
在JQuery的API手册中,extend方法挂载在JQuery 和 JQuery.fn两个不同的对象上,但在JQuery内部代码实现的是相同的,只是功能各不相同. 官方解释: jQuery.extend Merge the contents of two or more objects together into the first object. 把两个或者多个对象合并到第一个对象当中: jQuery.fn.extend Merge the contents of an object ont