首页 > 其他分享 >js-day01-商品订单信息

js-day01-商品订单信息

时间:2022-12-02 09:02:03浏览次数:78  
标签:prompt 表格 day01 js 订单 num let table price

学会表格表单(html+css)

表格的默认CSS属性

*{             margin: 0;             padding: 0;         }         table {             margin: 0 auto;             text-align: center;             border-collapse: collapse;         }         table th,         td{             border: 1px solid #000;             padding: 15px;         }         table caption{             margin: 15px 0;         } 表格的基本形式怎么写 <table>         <caption>             <h2>订单确认</h2>         </caption>         <tr>             <th>商品名称</th>             <th>商品价格</th>             <th>商品数量</th>             <th>总价</th>             <th>收货地址</th>         </tr>         <tr>             <td>小米手机青春PLUS</td>             <td>${price}</td>             <td>${num}</td>             <td>${total}</td>             <td>${address}</td>         </tr>     </table> 用户信息 表格怎么书写  //1.输入price num address三个变量         let price = +prompt('请输入商品价格:')         let num = +prompt('请输入购买的数量:')         let address = prompt('请输入地址:')         let total = price * num

 

标签:prompt,表格,day01,js,订单,num,let,table,price
From: https://www.cnblogs.com/nefu-xiaoshuang/p/16943350.html

相关文章