html常用表单元素(组件)

html常用表单元素(组件):

语法: <input type = ?/> 总共有10种,另外两种为文本域textarea,下拉列表选择框 select

问号代表的有以下十种:
  1. 文本框(默认——如果没有指定type,默认显示文本框)
   text 语法<input />
  2.密码框——password
  3.单选按钮——radio
  4.复选框——checkbox
  5.普通按钮——button
  6.提交按钮——submit
  7.重置按钮——reset
  8.文件域——file
  9.图像域——image
  10.隐藏域——hidden

 

 1      文本框:<input type="text" /><br />    
 2         密码框:<input type="password" /><br />
 3         
 4         单选按钮:<input type="radio" name="sex"/> 5                 <input type="radio" name="sex"/><br />
 6                 
 7         复选按钮:<input type="checkbox" name="hobby" />唱歌
 8                 <input type="checkbox" name="hobby"/>跳舞
 9                 <input type="checkbox" name="hobby"/>代码<br />
10                 
11         普通按钮:<input type="button" value="普通按钮"/><br />
12         提交按钮:<input type="submit" value="登陆" /><br />
13         重置按钮:<input type="reset" value="清空"/><br />
14         
15         文件域:    <input type="file" name="file1"/><br />
16         影像域:    <input type="image"  src="../img/btn.jpg"/ width="192" height="120"><br />
17         隐藏域:    <input type="hidden" name="userId"/><br />
18         
19         文本域:    <textarea cols="50" rows="10">
20                 请您输入观看《伴我同行》的感想 :)
21         </textarea><br />
22         
23         下拉列表选择框:<select>
24             <option>---请输入所在的城市---</option>
25             <option>北京</option>
26             <option>上海</option>
27             <option>广州</option>
28             <option>深圳</option>
29             <option>天津</option>
30         </select>

 

 

转载于:https://www.cnblogs.com/Lunix-touch/p/11229195.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值