html0007

2022-07-29

这里写自定义目录标题

下面展示一些
内联代码片

下面展示一些
内联代码片

html07
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <style>
      #btn{
        margin-top: -34px;
  margin-left: 196px;
      }
      #addBtn{
        width: 155px;
        height: 28px;
      }
   table{border-collapse: collapse;}
   table,tr{border: none;}
   #id1{width: 560px;height: 110px;border: 2px solid #000000}
    </style>
</head>
<body>
 <div id="id1">
  <table id="tab" border="1" width="560px" height="0px" align="center">
<!--   第一行表框-->
    <tr bgcolor="#E84169">
      <th width="33%">商品名称</th>
      <th width="11%">数量</th>
      <th width="20%">价格</th>
      <th width="36%">操作</th>
    </tr>
<!--    第二行表框-->
    <tr id="div2">
      <th width="33%">休闲鞋</th>
      <th width="11%">32</th>
      <th width="20%">568.50</th>
      <th width="36%">
      <button>删除</button> 
      <button>修改</button></th>
    </tr>
<!--    第三行表框(input(删除订单))-->
    <!--input出发时删除下面的订单!!!-->
   <tr id="div2">
      <th width="33%">钛项圈</th>
      <th width="11%">2</th>
      <th width="20%">49.00</th>
      <th width="36%">
      <button>删除</button> 
      <button>修改</button></th>
    </tr>
   <tbody>
    <!--tbody-->
   </tbody>
  </table>
  </div>
  <div id="btn">
    <input id="addBtn" type="button" name="btn"  value="删除订单" onclick="deleInput()">
  </div>
  <script>
    /*js实现删除裱框的一行(js)*/
 function deleInput(){        
  var del = document.getElementById("div2");     
  del.parentNode.removeChild(del);}
  </script>
</body>
</html>

本文地址:https://blog.csdn.net/m0_51295053/article/details/109247085

《html0007.doc》

下载本文的Word格式文档,以方便收藏与打印。