我需要的是: 我们在response.d中具有逗号分隔值的价值.现在我想将response.d的数据导出到.csv文件.
我写了这个函数来执行此操作.我已收到response.d中的数据但未导出到.csv文件,因此请为此问题提供解决方案以导出.csv文件中的数据.
function BindSubDivCSV(){
$.ajax({
type: "POST",
url: "../../WebCodeService.asmx / ShowTrackSectorDepartureList",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
alert(response.d);//export to csv function needed here
},
error: function (data) {}
});
return false;
}
Run Code Online (Sandbox Code Playgroud)