Blogger Information
Blog 18
fans 1
comment 0
visits 16251
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
1209 作业(列表/表格与表单)
空瓶子
Original
590 people have browsed it

1209 作业(列表/表格与表单)

课程表

主要代码
表头<thead></thead>

<thead> 标签定义表格的表头

  1. <tr>
  2. <td colspan="2"></td>
  3. <!-- <td></td> -->
  4. <td>星期一</td>
  5. <td>星期二</td>
  6. <td>星期三</td>
  7. <td>星期四</td>
  8. <td>星期五</td>
  9. </tr>
  10. </thead>```

表格主体<tbody></tbody>

<tbody> 标签表格主体(正文)

  1. <td rowspan="4">上午</td>
  2. <td>1</td>
  3. <td>语文</td>
  4. <td>数学</td>
  5. <td>英语</td>
  6. <td>政治</td>
  7. <td>历史</td>
  8. </tr>

合并单元格

  • 行合并:colspan=”number”一行中有多少个单元格进行合并,就是数字几
  1. <td colspan="7">中午午休</td>
  2. </tr>
  • 列合并:rowspan=”number”一列中有多少个单元格进行合并,就是数字几
  1. <td rowspan="4">下午</td>
  2. <td>5</td>
  3. <td>物理</td>
  4. <td>地理</td>
  5. <td>体育</td>
  6. <td>生物</td>
  7. <td>化学</td>
  8. </tr>

效果演示

表单

主要代码

  • 普通文本框
    <input type="text" name="username" id="username" value="" placeholder="请输入账号" required/>
  • 邮箱文本框
    <input type="email" name="email" id="email" value="" placeholder="请输入邮箱账号" required/>
  • 密码文本框
    <input type="password" name="password" id="password" placeholder="请输入密码" required/>
  • 单选按钮

    单选按钮中选项的 name 必须相同

  1. <label for="secret">性别</label>
  2. <div>
  3. <input type="radio" name="secret" id="secret" value="male" />
  4. <label for="male"></label>
  5. <input type="radio" name="secret" id="secret" value="female" />
  6. <label for="female"></label>
  7. </div>
  • 复选框
  1. <label for=hobby">兴趣</label>
  2. <div>
  3. <input type="checkbox" name="game" id="game">
  4. <label for="game">游戏</label>
  5. <input type="checkbox" name="sheying" id="sheying">
  6. <label for="sheying">摄影</label>
  7. <input type="checkbox" name="lvyou" id="lvyou">
  8. <label for="lvyou">旅游</label>
  9. <input type="checkbox" name="programme" id="programme">
  10. <label for="programme">编程</label>
  11. </div>
  • 下拉列表
  1. <label for="xueli">学历</label>
  2. <div>
  3. <select name="" id="">
  4. <option value="1">小学</option>
  5. <option value="2">初中</option>
  6. <option value="3">高中</option>
  7. <option value="4">本科</option>
  8. </select>
  9. </div>
  • 文件域
  1. <label for="user_pic">头像</label>
  2. <input type="file" name="user_pic" id="user_pic">
  • 文本域

<label for="jianjie">简介</label> <input type="textarea" name="" id="" >

  • 隐藏域

    隐藏域是用来数据传输使用,不展示在页面,给用户观看
    <input type="hidden" name="php" id="php" value="php是世界上最美的语言">

效果演示

Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post