extjs点击按钮下载
原理是生成一个隐藏的form,提交给它 { id : 'buttonA', text : "导出", iconCls: 'export-icon', handler : function() { if (!Ext.fly('test')) { var frm = document.createElement('form'); frm.id = 'test'; frm.name = id; frm.style.display = 'none'; document.body.appendChild(frm); } Ext.Ajax.request({ url: 'download.do', form: Ext.fly('test'), method: 'POST',
isUpload: true
});
}
}