jquery ajax 失败

之前使用

var par = "/main.php?do=statistic_for_etickets&flag=ajax&dates="+dates+"&draw_way_id="+draw_way_id+"&time_type="+time_type+"&dao="+dao_flag;
//alert(par);
if(dao_flag==2){//导出
window.open(par);
return;
}

$.ajax({
  type: "POST",
  url: "",
  data: par,
  success: function(msg){
  $('#result').html ( msg);
$('#result').show();
  
  }
});


一直报错

后来换成

var par = "do=statistic_for_etickets&flag=ajax&dates="+dates+"&draw_way_id="+draw_way_id+"&time_type="+time_type+"&dao="+dao_flag;
//alert(par);
if(dao_flag==2){//导出
   var new_par= "/main.php?do=statistic_for_etickets&flag=ajax&dates="+dates+"&draw_way_id="+draw_way_id+"&time_type="+time_type+"&dao="+dao_flag;
window.open(new_par);
return;
}

$.ajax({
  type: "POST",
  url: "main.php",
  data: par,
  success: function(msg){
  $('#result').html ( msg);
$('#result').show();
  
  }
});

 问题解决了

posted @ 2011-10-09 12:25  野三坡  阅读(326)  评论(0编辑  收藏  举报