Practice items:

Requirements: Complete the function of adding and deleting students’ personal information. When deleting, a confirmation box will pop up.

<! DOCTYPEhtml>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Student Management System</title>
    <link href=".. /public/css/bootstrap.min.css" rel="stylesheet">
    <link href=".. /public/css/style.css" rel="stylesheet">
    <style>
        .row>div{border: 1px solid # 000; }.modal{display: block;opacity:1;top: 100px; overflow:visible; }</style>
</head>
<body>
    <div id="app">
    <div class="container">
        <table class="table table-striped">
            <caption>Student Management System V1.0 - Show students</caption>
            <tr>
                <th>The name</th>
                <th>age</th>
                <th>gender</th>
                <th>operation</th>
            </tr>
            <tr>
                <td>Xiao Ming</td>
                <td>15</td>
                <td>male</td>
                <td><button class="btn btn-danger btn-xs" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">delete</button></td>
            </tr>
            <tr>
                <td>Xiao Ming</td>
                <td>15</td>
                <td>male</td>
                <td><button class="btn btn-danger btn-xs" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">delete</button></td>
            </tr>
            <tr>
                <td>Xiao Ming</td>
                <td>15</td>
                <td>male</td>
                <td>
                    <button class="btn btn-danger btn-xs" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">delete</button>
                </td>
            </tr>
        </table>
        <hr>
        <hr>
        <hr>
        <form action="">
          <table class="table table-striped">
              <caption>Add Student information</caption>
              <tr>
                  <td>project</td>
                  <td>information</td>
              </tr>
              <tr>
                  <td>The name</td>
                  <td>
                      <input type="text" class="form-control" id="stuname" placeholder="Name" name="stuname">
                  </td>  
              </tr>
              <tr>
                  <td>age</td>
                  <td>
                      <input type="text" class="form-control" id="stuage" placeholder="Age" name="stuage">
                  </td>  
              </tr>
              <tr>
                  <td>gender</td>
                  <td>
                      <label class="gen-span"><input type="radio" class="radio-info" name="gender" checked value="Male"></label>
                      <label class="gen-span"><input type="radio" class="radio-info" name="gender" value="Female"></label>
                      <label class="gen-span"><input type="radio" class="radio-info" name="gender" value="Confidential">A secret</label>
                  </td>
              </tr>
          </table>
          <div style="text-align: center;"><input type="button" class="btn btn-info btn-sm add-btn" value="Definite increase"/></div>
          </form>
    </div>
    <! Delete button confirmation box -->
    <div class="modal fade" id="exampleModal" tabindex="1" role="dialog" aria-labelledby="exampleModalLabel">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
              <h4 class="modal-title" id="exampleModalLabel">Confirmation box</h4>
            </div>
            <div class="modal-body">
              <form>
                 <div class="form-group">
                  <label for="message-text" class="control-label">Sure to delete<strong class="control-label-name" style="color:blue">Xiao Ming</strong>?</label>
                </div>
              </form>
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal">return</button>
              <a href="# # #" class="delete-a"><button type="button" class="btn btn-primary">confirm</button></a>
            </div>
          </div>
        </div>
      </div>
    </div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
            // Existing data:
            / * arr: [{name: "xiao Ming, age: 12, gender:" male "}, {name: "little red", the age: 10, gender: "female"}, {name: }] */
</script>
</body>
</html>
Copy the code

The opening effect is as shown in the figure: