写个图书管理系统网页

<p>下面是一个简单的图书管理系统的网页版本的代码,使用了 HTML、CSS 和 JavaScript:</p>
<p>```html
<!DOCTYPE html></p>
<html>
  <head>
    <meta charset="UTF-8">
    <title>图书管理系统</title>
    <style>
      table {
        width: 100%;
        border-collapse: collapse;
      }
      th, td {
        border: 1px solid black;
        padding: 8px;
        text-align: left;
      }
      th {
        background-color: lightgray;
      }
      input[type="text"], select {
        width: 100%;
        padding: 12px;
        border: 1px solid lightgray;
        border-radius: 4px;
        box-sizing: border-box;
        margin-top: 6px;
        margin-bottom: 16px;
        resize: vertical;
      }
      input[type="submit"] {
        background-color: lightblue;
        color: white;
        padding: 12px 20px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
      }
      input[type="submit"]:hover {
        background-color: blue;
      }
      .form {
        background-color: white;
        padding: 20px;
        border-radius: 5px;
        width: 50%;
        box-sizing: border-box;
        margin: 20px auto;
        text-align: center;
      }
      .form h2 {
        margin-top: 0;
      }
    </style>
  </head>
  <body>
    <div class="form">
      <h2>添加图书</h2>
      <form id="add-book-form">
        <input type="text" id="name" placeholder="图书名称" required>
        <input type="text" id="author" placeholder="作者" required>
        <input type="text" id="isbn" placeholder="ISBN" required>
        <select id="category">
          <option value="科技">科技</option>
          <option value="历史">历史</option>
          <option value="文学">文学</option>
        </select>
        <input type="submit" value="添加">
      </form>
    </div>
    <table id="book-table">
      <tr>
        <th>图书名称</th>
        <th>作者</th>
        <th>ISBN</th>
        <th>分类</th>
        <th>操作</th>
      </tr>
    </table>
    <script>
      const form = document.querySelector("#add-book-form");
      form
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值