HTML 示例记录

表格 table

rowspancolspan属性合并单元格,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

在这里插入图片描述
inputtype="radio"单选框的name相同视为同一组,checkbox复选框,button普通按钮,submit提交按钮
labelfor转移事件到指定id
selectoption选择框,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"  //禁用属性
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值