我写了一段js,用同一个按钮做导出,分别导出excel和图片,但是只会导出图片, var time=_g().getWidgetByName("p_time").getValue(); var REPORT_URL1 ='${servletURL}?viewlet=devp/chenjiale/EXPORT/01market_situation/01daily_closing.cpt&p_time='+time+'&op=form_adaptive&op=export&format=excel&__filename__='+time+'上证综指每日收盘'; window.location = encodeURI(REPORT_URL1); var REPORT_URL2 ='${servletURL}?viewlet=devp/chenjiale/EXPORT/01market_situation/pic/01_daily_closing.cpt&p_time='+time+'&op=form_adaptive&op=export&format=image&__filename__='+time+'上证综指每日收盘'; window.location = encodeURI(REPORT_URL2); |