施用window.open("people.xls"'_blank');下载xls表

使用window.open(people.xls,_blank)下载xls表Java codevar w window.open(people.xls,_blank)

使用window.open("people.xls",'_blank');下载xls表

Java code
var w  = window.open("people.xls",'_blank');            w.location.href=fileUrl;  

我在JS中使用上面代码来下载people.xls文件,报JS错误fileUrl为定义,本人新手,不知道fileUrl这个需要在那里定义?

[解决办法]
var w = window.open("people.xls",'_blank'); 
w.location.href=fileUrl;

直接这么写就可以

window.open("people.xls",'_blank'); 
或者
window.location.href="people.xls";
[解决办法]
fileUrl这是一个参数吧。那里传的。