莫菲    

jquery使用ajax请求页面后在新的窗口打开

7年前发布  · 932 次阅读
  jquery 
$.ajax({
   url:'order',
   method:'post',
   data:{products:products},
   success:function (data) {
      var win = window.open();
      win.document.write(data);
   }
});

但目前有一个问题,这个打开方式会被chrome拦截,

用了另外一种方法,写了一个隐藏的form表单,然后在js中提交该表单