回复 [url=/Question/99643-596369]3#[/url] ddtlo
试试这段代码,之前还真没遇到过点击下载会跳转主页的问题
function Sel()
{
var cognosselect = document.getElementById(\"cognosselect\");
var index = cognosselect.selectedIndex;
var val = cognosselect.options[index].value;
if (index == 1)
{
javascript:gCognosViewer.getRV().viewReport(\'PDF\');
}
else if (index == 2)
{
javascript:gCognosViewer.getRV().viewReport(\'XLWA\');
}
else if (index == 3)
{
javascript:gCognosViewer.getRV().viewReport(\'spreadsheetML\');
}
else if (index == 4)
{
javascript:gCognosViewer.getRV().viewReport(\'CSV\');
}
else
{
alert(\"请选择您需要的格式\");
}
}
请选择下载格式PDF格式EXCEL2003EXCEL2007CSV[带分隔符的文本]