页面嵌入隐藏iframe实现导出功能

时间:2021-12-04 06:05:21
 <div style="display: none">
	<form action="" name="exportExcel" id="exportExcel" target="export
		method="post" accept-charset="utf-8"></form>
	<iframe name="export" id="export"></iframe>
 </div>

  

var f = document.getElementById('exportExcel');
var actionUrl = 'envElecPriceAction!downLoadDetailFrist.action?envElecPrice.beginTime=' + beginTime
	+ '&envElecPrice.endTime=' + endTime
	+ '&envElecPrice.zoneId='  + zoneId
	+ '&envElecPrice.pollSourceId=' + pollSourceId
	+ '&envElecPrice.pollSourceName=' + Ext.getCmp('sourceNameId33').getValue()
	+ '&envElecPrice.labelId=' + Ext.getCmp('groupLabelComboBoxId3').getValue()
	+ '&envElecPrice.polluteName='+ polluteData;
f.action = actionUrl;
f.submit();