12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>table</title>
- <link rel="stylesheet" href="/static/css/bootstrap.min.css">
- <script src="/static/js/jquery-3.1.1.min.js"></script>
- <script src="/static/js/bootstrap.min.js"></script>
- </head>
- <body>
- <div id="tableDiv" class="table-responsive" style="height: calc(100% - 5px);overflow:scroll">
- <table class="table table-striped">
- <thead>
- <tr>
- {% for key in chList %}
- <th>{{key}}</th>
- {% endfor %}
- <th>通知</th>
- </tr>
- </thead>
- <tbody>
- {% for key, values in data.items() %}
- <tr class="active">
- <td>{{key}}</td>
- {% for k, v in values.items() %}
- <td>{{v}}</td>
- {% endfor %}
- <td><button class="btn-info" type="button" onclick="sendMsgNo({{key}})">发送</button></td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- <script>
- // $("#tableDiv").height($("#moveItemDigital_body").height()-60);
- function sendMsgNo(key){
- $.post('/sendMsgNo', {'no':key}, function (data, status){
- console.log("sendMsgNo:"+data+status)
- })
- }
- </script>
- </body>
- </html>
|