csvx.iife实现table表格导出为csv excel文件代码

代码语言:html

所属分类:表格

代码描述:csvx.iife实现table表格导出为csv excel文件代码

代码标签: csvx.iife table 表格 导出 csv excel 文件 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>

<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.4.3.1.min.css">
    <style>
        body {
            background-color: #fafafa;
        }

        .container {
            margin: 150px auto;
            max-width: 640px;
        }

        table {
            margin: 1.5rem 0;
        }
    </style>
</head>

<body>

    <div class="container">

        <button id="csv" class="btn btn-danger">导出 CSV</button>
        <div id="table">
            <table class="table table-striped table-bordered">
                <thead>
                    <tr>
                        <th>Firstname</th>
                        <th>Lastname</th>
                        <th>Age</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Jill</td>
                        <td>Smith</td>
                        <td>50</td>
                    </tr>
                    <tr>
                        <td>Eve</td>
                        <td>Jacksona</td>
                        <td>94<.........完整代码请登录后点击上方下载按钮下载查看

网友评论0