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(\"Please select format!\");
}
}
试一下这个
收起谢谢 magaochen521 , 可以解决问题。