取出數據庫里面的數據並呈現在頁面上


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,接下來需要提取數據庫里面的數據,遍歷,並呈現在這個頁面上


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM