写一个layui表格,表头是(序号,工作内容,完成日期,操作(操作里面是删除功能))
时间: 2024-05-05 13:20:29 浏览: 20
好的,以下是代码示例:
```html
<table class="layui-table">
<thead>
<tr>
<th>序号</th>
<th>工作内容</th>
<th>完成日期</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>完成任务A</td>
<td>2021-01-01</td>
<td><button class="layui-btn layui-btn-sm layui-btn-danger">删除</button></td>
</tr>
<tr>
<td>2</td>
<td>完成任务B</td>
<td>2021-01-02</td>
<td><button class="layui-btn layui-btn-sm layui-btn-danger">删除</button></td>
</tr>
<tr>
<td>3</td>
<td>完成任务C</td>
<td>2021-01-03</td>
<td><button class="layui-btn layui-btn-sm layui-btn-danger">删除</button></td>
</tr>
</tbody>
</table>
```
解释一下,这是一个基于 Layui 框架的表格,包含表头和三行数据,每行数据分别有四列,分别是序号、工作内容、完成日期和操作。操作列里有一个按钮,可以触发删除操作。你可以根据实际需求修改表格数据和样式。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)