ext
共 2 篇文章
ext中实现点击button进行下载
点击button进行下载 原理是生成一个隐藏的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: 'dow…
2012-10-26 14:03 · ext
json串多了<pre>标签,ext报错
1.返回的json串前面多出了<pre style="word-wrap: break-word; .....> 的东西,导致转js对象时报错,查看后台也没见到添加 标签,应该是浏览器添加的。 解决办法,把response的contentType设置为text/html即可: this.getResponse().setContentType("text/html;charset=UTF-8"); Content-Type对浏览器解析的一些影响 当为web服务器输出的内容指定Content-Type为text/html时,浏览器会对内容做一些额外的转换工作,比如"""这样的实体形式就…
2012-08-04 15:23 · ext