取出数据库里面的数据并呈现在页面上

1,html页面

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <table>
        <thead>
        <tr>
            <th scope="col">编号</th>  //表示这是列
            <th scope="col">名称</th>
            <th scope="col">操作</th>
        </tr>
        </thead>

        <tbody>
        <tr>
            <th scope="row">1</th>   //第一列如果是编号的话应该用th 而不是td
            <td>奇趣事</td>
            <td><a href="">删除</a></td>  //删除是一个 a 标签
        </tr>
        </tbody>
    </table>
</head>
<body>
</body>
</html>

2,接下来需要提取数据库里面的数据,遍历,并呈现在这个页面上

原文地址:https://www.cnblogs.com/shanlu0000/p/11610975.html