博客列表 >190702作业:表格和表单

190702作业:表格和表单

执着的博客
执着的博客原创
2019年07月03日 19:47:041607浏览

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格</title>
</head>
<body>
<ul>
    <li>编号</li>
    <li>名称</li>
    <li>数量</li>
    <li>单价</li>
    <li>金额</li>
</ul>
<ol start="5">
    <li>编号</li>
    <li>名称</li>
    <li>数量</li>
    <li>单价</li>
    <li>金额</li>
</ol>
<table border="1" cellspacing="0" cellpadding="5" >
    <caption>购物车</caption>
    <thead>
    <tr bgcolor="#a9a9a9" align="center">
        <th>编号</th>
        <th>名称</th>
        <th>数量</th>
        <th>单价</th>
        <th>金额</th>
    </tr>
    </thead>
    <tbody>
<tr align="center">
    <td width="50" rowspan="3">1</td>
    <td width="50">电脑</td>
    <td width="50">2</td>
    <td width="50">6000</td>
    <td width="60">12000</td>
</tr>
<tr align="center">
    <td>手机</td>
    <td>5</td>
    <td>3000</td>
    <td>15000</td>
</tr>
<tr align="center">
    <td>笔记本</td>
    <td>1</td>
    <td>4000</td>
    <td>4000</td>
</tr>
    </tbody>
    <tfoot>
    <tr align="center">
        <td colspan="4">总计:</td>
        <td>31000</td>
    </tr>
    </tfoot>
</table>
</body>
<h4>用户注册</h4>
<form action="" method="get" name="register">
<p>
    <lable for="username">帐号:</lable>
    <input type="text" id="username" name="username" placeholder="不超过八个字符" >
</p>
    <p>
        <lable for="password">密码:</lable>
        <input type="password" id="password" name="password" placeholder="6-16个字符" >
    </p>
    <p>
        <lable for="email">邮箱:</lable>
        <input type="email" id="email" name="email" placeholder="example@mail.com" required >
    </p>
    <p>
        <lable for="age">年龄:</lable>
        <input type="number" id="age" name="age" min="16" max="70">
    </p>
    <p>
        <lable for="birthday">生日:</lable>
        <input type="date" id="birthday" name="birthday">
    </p>
    <p>
        <lable for="course">课程:</lable>
        <select name="course" id="course" size="1">
            <option value="0">HTML5</option>
            <option value="1">PHP</option>
            <option value="2">JAVA</option>
            <option value="3">MYSQL</option>
            <option value="04">CSS</option>
        </select>
    </p>
  <p>
      <lable for="pro">爱好:</lable>
      <input type="checkbox" name="hobby" value="game" id="game">
      <lable for="game">打游戏</lable>
      <input type="checkbox" name="hobby" value="pro" id="pro">
      <lable for="game">看电影</lable>
      <input type="checkbox" name="hobby" value="gameS" id="gameS">
      <lable for="gameS">撸代码</lable>
  </p>
    <p>
        <lable for="abc">性别:</lable>
        <input type="radio" name="def" value="abc" id="abc"><lable for="abc">男</lable>
        <input type="radio" name="def" value="female" id="female"><lable for="female">女</lable>
        <input type="radio" name="def" value="secrecy" id="secrecy"><lable for="secrecy">保密</lable>
    </p>
<p>
    <lable>简介:</lable>
   <textarea name="comment" id="" cols="30" rows="10"></textarea>
</p>
    <p>
     <button type="submit">提交</button>
        <button type="button">Ajax</button>
    </p>
</form>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

 

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议