日期:2014-05-17  浏览次数:20699 次

做了一个下载,在FF中正常下载,在IE中怎么显示404错误呢?
下载代码是:
var searchText=$('searchText').value;
var wnd=openCenterWindow("poem/batchDownload.do?searchText="+searchText,"下载XLS",400,300);

openCenterWindow函数是:
function openCenterWindow(url,windowName,width,height){
  var left = (window.screen.availWidth-10-width)/2;  
  var top = (window.screen.availHeight-30-height)/2;  
   
var wnd=window.open(url,windowName,"height="+height+",width="+width+",top="+top+",left="+left+",resizable=yes,scrollbars=yes,status=no,location=no,");
return wnd;
}

下载是一个文本文件,在FF中好用,没有问题。在IE中怎么就显示404错误呢?另IE中开的是新窗口,里面显示404错误。

------解决方案--------------------
你把路径写全一下看看,
var wnd=openCenterWindow("<%=basePath%>poem/batchDownload.do?searchText="+searchText,"下载XLS",400,300);