首页 > 代码库 > 页面嵌入隐藏iframe实现导出功能

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

 <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();

  

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