1.easyUi必须用表单提交
function downloadFile(index){
$("#tbl_role").datagrid(‘selectRow’, index);
var row = $("#tbl_role").datagrid(“getSelected”);
if(row.fileName!=""||row.fileName!=null||row.fileName!=undefined){
var form=$("<form>");//定义一个form表单
form.attr("style","display:none");
form.attr("target","");
form.attr("method","post");
form.attr("action",'${pageContext.request.contextPath}/sysLogs/downloadFile');
var fileInput=$("<input>");
fileInput.attr("type","hidden");
fileInput.attr("id","fileName");//设置属性的名字
fileInput.attr("name","fileName");//设置属性的名字
fileInput.attr("value",row.fileName);//设置属性的值
$("body").append(form);//将表单放置在web中
form.append(fileInput);