<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<html>
<head>
<p style="font-size: 20px;color: red;">使用js方式将json导出csv文件</p>
<button οnclick='tableToExcel()'>导出</button>
</head>
<body>
<script>
function tableToExcel(){
//要导出的json数据
const jsonData = [
{
name:'路人甲',
phone:'123456789',
email:'000@123456.com',
sex:'男',
},
{
name:'路人乙',
phone:'123456789',
email:'000@123456.com',
sex:'男',
},
{