表格 table
rowspan
和colspan
属性合并单元格,border
边框,th
标题单元格,td
普通单元格,thead tbody tfoot
定义范围
align valign
分别定义水平和垂直对齐方式
其他:bgcolor
背景颜色,cellpadding
内容与边框间距,cellspacing
单元格与单元格间距,frame
设置表格外边框,rules
设置内边框(单元格)
<table border="1px" width="600px">
<caption>库存商品表</caption>
<thead>
<tr>
<th>商品类别</th>
<th>商品名称</th>
<th>单位</th>
<th>数量</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2">家电类</td>
<td>冰箱</td>
<td>台</td>
<td>50</td>
</tr>
<tr>
<td>洗衣机</td>
<td>台</td>
<td>13</td>
</tr>
<tr>
<td>辅料</td>
<td>插线板</td>
<td>个</td>
<td>14</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan='4'>备注:</td>
</tr>
</tfoot>
</table>
表单 form
input
:type="radio"
单选框的name
相同视为同一组,checkbox
复选框,button
普通按钮,submit
提交按钮
label
的for
转移事件到指定id
上
select
:option
选择框,size
属性修改为选择列表框(默认下拉选择 multiple
支持多选)selected="selected"
在option
里默认选中
<form action="" method="">
<label for="username">请输入姓名:</label>
<input type="text" name="" id="username"><br>
<label>请输入密码:</label>
<input type="password" name="" id=""><br>
<label>性别</label>
<input type="radio" name="gender" id="" value="男" checked="true">男
<input type="radio" name="gender" id="" value="女">女<br>
<label>兴趣爱好</label>
<input type="checkbox" name="" value="1">游泳
<input type="checkbox" name="" value="4">思考<br>
<label>生日:</label>
<select>
<option value="1995">1995</option>
<option value="1997" selected="selected">1997</option>
</select>年
<select>
<option value="1">01</option>
<option value="2">02</option>
</select>月<br>
头像<img src="image/headLogo/13.gif">
<input type="button" value="普通按钮">
<input type="submit" value="提交按钮">
</form>
表单其他内容
多行文本框
<textarea rows="5" cols="30">请输入</textarea>
选择文件
<input type="file">
隐藏域
<input type="hidden">
disabled="disabled" //禁用属性