ITeye博客

js

共 1 篇文章

兼容火狐 IE 的---导出Excel

[code="java"] /** 导出Excel*/ var exportTab = (function() { var uri = 'data:application/vnd.ms-excel;base64,'; var template = '{table} '; var base64 = function(s) {return window.btoa(unescape(encodeURIComponent(s))) }; var format = function(s, c) {return s.replace(/{(\w+)}/g,function(m, p) {return c[…

2013-09-05 17:55 · js · Excel