jQuery 테이블에서 CSV 플러그인을 사용하고 있습니다. 브라우저에 CSV 파일을 다운로드하도록 팝업을 변경했습니다. jQuery 테이블에서 CSV 내보내기
그것은이었다function popup(data) {
window.location='data:text/csv;charset=utf8,' + encodeURIComponent(data);
return true;
}
그것은 대부분의 작품 : 나는 그것을 변경했습니다
function popup(data) {
var generator = window.open('', 'csv', 'height=400,width=600');
generator.document.write('<html><head><title>CSV</title>');
generator.document.write('</head><body >');
generator.document.write('<textArea cols=70 rows=15 wrap="off" >');
generator.document.write(data);
generator.document.write('</textArea>');
generator.document.write('</body></html>');
generator.document.close();
return true;
}
. 이상한 파일 이름 (예 : 14YuskG_.csv.part)이 만들어지기 때문에 스프레드 시트 소프트웨어를 찾고 파일 이름을 직접 만들어야합니다.
개선 방법에 대한 제안 사항이 있으십니까?
jQuery를 테이블 : http://www.kunalbabre.com/projects/table2CSV.php, 감사 쿠날 Babre – timborden