<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="oscar999">
<title>
</title>
<script>
function clickDownload(aLink)
{
var str = "栏位1,栏位2,栏位3\n值1,值2,值3,10";
str = encodeURIComponent(str);
aLink.href = "data:text/csv;charset=utf-8,\ufeff"+str;
}
</script>
</head>
<body>
<a id="test" onclick="clickDownload(this)" download="下载.csv" href="#">download</a>
</body>
</html>