190724html表单练习

表单练习:

最终效果

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
			  <form action="www.csdn.com" method="">
		<label for="one">邮箱:</label>
		<input type="text" id="one"  /><br />
		&nbsp;&nbsp;需要通过邮箱激活账户<br />
		<label for="two">密码</label>
		<input type="password" id="two"  /><br />
		<label for="three">确认密码</label>
		<input type="password" id="three"/><br />
		性别: <input type="radio" checked="checked"/>男
			  <input type="radio" />女<br /><br />
			  描述一下您的特长:<br />
			  <textarea></textarea><br />
			  选择您的兴趣爱好:<br />
			  <input type="checkbox" />抽烟 
			  <input type="checkbox" />喝酒 <br />
			  选择出生日期:<select>
			  	<optgroup label="1900before"></optgroup>
			  	<option>1800</option>
			  	<option>1700</option>
			  </select>
			  <input type="button" value="普通按钮" />
			  <input type="submit"  value="提交按钮"/>
			  <input type="reset"  value="清空按钮"/>
			  </form>
	</body>
</html>

出错部分有:

<label for="one">邮箱:</label>
		<input type="text" id="one"  /><br />
记不清用id还是name

input type="radio" checked="checked"/>男
```记不清radio的含义

 <input type="checkbox" />抽烟 
 记不清checkbox的含义
	<optgroup label="1900before"></optgroup>
	忘记给optgroup加label而是写在标签之间导致下拉组不显示
		  <form action="www.csdn.com" method="">
		  form为表单域,注意要提交的所有部分都要包括在form中
             <input type="button" value="普通按钮" />
			  <input type="submit"  value="提交按钮"/>
			  <input type="reset"  value="清空按钮"/> -->
			  <button>默认为提交按钮</button>
			   <button type="submit">提交按钮</button>
			  <button type="reset">清空按钮</button>
			  <button type="button">普通按钮</button>
			  button的另一种写法,注意与前一种不同的是button默认为submit(提交),当button type=button时才是普通按钮
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值