<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.js"></script>
    <script type="text/javascript" src="{{asset('mystyle')}}/tableExport/libs/FileSaver/FileSaver.min.js"></script>
    <script type="text/javascript" src="{{asset('mystyle')}}/tableExport/tableExport.min.js"></script> 

    <script type="text/javascript">
      $(document).ready(function(e){
          $("#txt").click(function(e){
            $("#example1").tableExport({
              type: 'txt',
              escape: 'false',
            });
          });
        });

    //   $('#tableID').tableExport(
    //     {type:'txt',escape:'false'}
    //   );

    </script>
</head>
<body>
    <button id="txt">TEXT</button>
    <table>
        <tr>
          <th>Firstname</th>
          <th>Lastname</th>
          <th>Age</th>
        </tr>
        <tr>
          <td>Jill</td>
          <td>Smith</td>
          <td>50</td>
        </tr>
        <tr>
          <td>Eve</td>
          <td>Jackson</td>
          <td>94</td>
        </tr>
        <tr>
            <td>Eve</td>
            <td>Jackson</td>
            <td>94</td>
          </tr>
          <tr>
            <td>Eve</td>
            <td>Jackson</td>
            <td>94</td>
          </tr>
          <tr>
            <td>Eve</td>
            <td>Jackson</td>
            <td>94</td>
          </tr>
      </table>
</body>
</html>