使用window.open(URL)方法,不是文档上的例子,如何实现svg参数传到后台,通过action实现图表导出?求大神解答,最好能有代码例子
2条回答 默认 最新
- 斯洛文尼亚旅游 2016-01-21 09:46关注
指定type为 type: 'image/svg+xml'可以返回svg html代码,自己用Ext.Ajax.request post html代码到你的动态页
var svg = chart.save({ type: 'image/svg+xml' }); Ext.Ajax.request({ url: 'xxxxxxxx', method: 'post', params: { svg: svg }, success: function (xhr) { alert('success\n' + xhr.responseText) }, failure: function (xhr) { alert('ERROR\n' + xhr.responseText) } });
SVG生成图片自己百度,一堆。。
http://blog.sina.com.cn/s/blog_8d6412510101dfyl.html本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报