您的位置:首页 > Web前端

网易微专业 前端工程师 学习笔记

2017-07-28 18:32 218 查看

1.3 HTML

#### 1.3.2.6 表格

 常用表格模版如右所示: 注:
元素或属性意义
caption表示表格名称
thead表示表格顶部
tbody表示表格主体
tfoot表示表格底注
tr表示行
th表示表头(可以是横着也可以是竖着)
td正常单元格
rowspan可以合并行
colspan可以合并列
<table>
<caption>abc</caption>
<thead>
<tr>
<th> A </th>
……
</tr>
</thead>
<tbody>
<tr>
<th rowspan = "2"> B </th>
……
</tr>
</tbody>
<tfoot>
<tr>
<td colspan = "3"> C </td >
……
</tr>
</tfoot>
</table >


#### 1.3.2.7表单

 常用表单模版如右所示: 注:
元素或属性意义
action提交表单的后台接口
method表单提交的方式
fieldset分区
legend标题
input输入(有很多类型)
typefile、checkbox、radio、text、submit、reset、email、url、number、tel、search、range、color、date picker
buttonsubmit、reset
select下拉选择框
option选择项
textarea多行文本框
<form action = "/login" method = "post">
<fieldset>
<legend>表格名称</legend>
<lable> </lable>
<input type = "" name = "" value = "">
<button type = "submit"></button>
<select>
<option value = "0">A</option>
<option value = "1">B</option>
<option value = "2" selected>C</option>
<div> </div>
</fieldset>
</form>

lable 和 input 等输入项 用 for 连接需使 for 后面的值与 input 中的 id 属性值相同
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: