摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" href=&quo
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="layui/css/layui.css"> <script src="layui/layui.js"></script> <title></title> <style> .header{border-bottom: 2px #009688 solid;} .header span{background-color: #009688;color: #fff;padding: 10px;line-height: 34px;margin-left: 30px;} .header button{float:right;} </style> </head> <body style="padding:10px;"> <div> <span>管理員列表</span> <button class="layui-btn layui-btn-sm">添加</button> </div> <table id="demo" lay-filter="test"></table> <table> <thead> <tr> <th>ID</th> <th>用戶名</th> <th>性別</th> <th>城市</th> <th>簽名</th> <th>積分</th> <th>操作</th> </tr> </thead> <tbody> <tr> <td>001</td> <td>賢心</td> <td>男</td> <td>上海</td> <td>好好學(xué)習(xí)</td> <td>10086</td> <td> <button class="layui-btn layui-btn-xs">編輯</button> <button class="layui-btn layui-btn-xs layui-btn-warm" onclick="del()">刪除</button> </td> </tr> <tr> <td>002</td> <td>張愛玲</td> <td>男</td> <td>北京</td> <td>看書,寫作</td> <td>10086</td> <td> <button class="layui-btn layui-btn-xs">編輯</button> <button class="layui-btn layui-btn-xs layui-btn-danger" onclick="del()">刪除</button> </td> </tr> <tr> <td>003</td> <td>小孔</td> <td>男</td> <td>六安</td> <td>天天向上</td> <td>10086</td> <td> <button class="layui-btn layui-btn-xs">編輯</button> <button class="layui-btn layui-btn-xs layui-btn-danger" onclick="del()">刪除</button> </td> </tr> </tbody> </table> <script> layui.use('layer', function(){ var layer = layui.layer; }); function del(){ layer.confirm('確定要刪除么?', { icon: 2, btn: ['確定', '取消'] //可以無限個按鈕 }, function(index, layero){ //按鈕【按鈕一】的回調(diào) }, function(index){ //按鈕【按鈕二】的回調(diào) }); } </script> </body> </html>
批改老師:天蓬老師批改時間:2019-02-03 15:17:01
老師總結(jié):看不到你的表格最終的效果, 發(fā)個圖有這么困難嗎?