form表单的属性标签和练习

form表单的标签

  做一个如下图的form表单:

  

  我们的代码如下:

    

<body leftmargin="400px" topmargin="200px">
<form method="post" action="http://www.baidu.com">
<table border="2px" heigth="200px">
<tr>
<td align="right">用户名:</td>
<td>
<input type="text" name="" id="" value="" placeholder="请输入用户名" /> 
</td>
</tr>
<tr>
<td align="right">密码:</td>
<td>
<input type="password" name="" id="" value="" placeholder="请输入密码"/> 
</td>
</tr>
<tr>
<td align="right">确认密码:</td>
<td>
<input type="password" name="" id="" value="" placeholder="请再次输入密码"/> 
</td>
</tr>

<tr>
<td align="right">验证码:</td>
<td>
<input type="text" name="" id="" value="" placeholder="请输入验证码" /><img src="1.gif" width="30px"/> 
</td>
</tr>
<tr>
<td align="right">性别:</td>
<td>
<input type="radio" name="r1" id="r1" checked="checked" value="" />
<lable for="r1"></lable>
<input type="radio" name="r1" id="r2" value="" />
<lable for="r1"></lable> 
</td>
</tr>
<tr>
<td align="right">年龄:</td>
<td>
<input type="text" name="" id="" value="" placeholder="请输入年龄"/> 
</td>
</tr>
<tr>
<td align="right">爱好:</td>
<td>
<select name="" id="si" size="1" multiple="multiple">
<option value="">购物</option>    
<option value="">上网</option>
<option value="">运动</option>
<option value="">看电影</option>
<option value="">听音乐</option>
</select> 

</td>
</tr>
<tr>
<td align="right">你喜欢的游戏:</td>
<td>
<input type="checkbox" name="" id="c1" value="b1" />
<label for="c1">穿越火线</label>
<input type="checkbox" name="" id="c2" value="b2" checked="checked"/>
<label for="c2">英雄联盟</label>
<input type="checkbox" name="" id="c3" value="b3" />
<label for="c3">逆战</label>
<input type="checkbox" name="" id="c4" value="b4" />
<label for="c1">守望先锋</label>
</td>
</tr>
<tr>
<td align="right">邮箱:</td>
<td>
<input id="" name="" value="" placeholder="请输入邮箱" />@qq.com7
</td>
</tr>
<tr>
<td align="right">邮箱密码:</td>
<td>
<input type="password" name="" id="" value="" placeholder="请输邮箱入密码"/> 
</td>
</tr>
<tr>
<td align="center">
<input type="submit" name="" id="" value="提交" /> 
</td>
<td>
<input type="reset" name="" id="" value="重置"/> 
</td>
</tr>
</table>
</form>

</body>

 

form的常用标签和属性都有了,有什么问题多多交流。

转载于:https://www.cnblogs.com/axj1993/p/6210520.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值