转自:https://xhmaomy-163-com.iteye.com/blog/1066977
fieldset——一个不常用的HTML标签

fieldset 标签 -- 对表单进行分组

  在form表单中,我们可以对form中的信息进行分组归类,如注册表单的form,我们可以将注册信息分组成
    基本信息(一般为必填)
    详细信息(一般为可选)
  那我们如何更好的来实现呢?我们可考虑在表单form中加入下面两个标签:
    fieldset:对表单进行分组,一个表单可以有多个fieldset。
    legend:说明每组的内容描述。

格式:

  <fieldset>
    <legend>health information</legend>
      height: <input type="text"/>
      weight: <input type="text"/>
  </fieldset>

html:

<HTML>

   <head>      <meta charset="utf-8" /> <title></title> </head>

 <body> <form action="http://www.dreamdu.com/dreamdu.php" method="post" enctype="multipart/form-data" id="dreamduform"> <fieldset> <legend>用户名与密码:</legend> <input name="hiddenField" type="hidden" value="hiddenvalue" /> <label for="username">用户名:</label> <input type="text" id="username" value="www.dreamdu.com" /> <label for="pass">密码:</label> <input type="password" id="pass" /> </fieldset> <fieldset> <legend>性别:</legend> <label for="boy">男</label> <input type="radio" value="1" id="sex" /> <label for="girl">女</label> <input type="radio" value="2" id="sex" /> <label for="sex">保密</label> <input type="radio" value="3" id="sex" /> </fieldset> <fieldset> <legend>我最喜爱的:</legend> <label for="computer">计算机</label> <input type="checkbox" value="1" id="fav" /> <label for="trval">旅游</label> <input type="checkbox" value="2" id="fav" /> <label for="buy">购物</label> <input type="checkbox" value="3" id="fav" /> </fieldset>

 </form> </body>

</HTML>

result:

html_1:

<fieldset style="width:300;height:150;border:1px dashed red" align="center"> <legend style="width:100px;border:1px dashed #ff9966;">#ff0000;text-align:center;font-family:arial;font-weight:bold"> 1234 </legend></fieldset>

result_1:

Me discréditer résister, peut supporter beaucoup de compliments!

转载于:https://www.cnblogs.com/sharpest/p/7806840.html

fieldset 标签 -- 对表单进行分组相关推荐

  1. HTML fieldset 标签 -- 表单分组

    如果一个页面的表单项太多,我们最好把它们分组显示,就像使用p标签分开段落一样,可以使用fieldset与legend标签对表单内容分组. fieldset 标签 -- 对表单进行分组 fieldset ...

  2. spring mvc使用@InitBinder 标签对表单数据绑定

    在SpringMVC中,bean中定义了Date,double等类型,如果没有做任何处理的话,日期以及double都无法绑定. 解决的办法就是使用spring mvc提供的@InitBinder标签 ...

  3. html中fieldset改颜色,HTML fieldset 标签的具体用法是什么?怎么用fieldset设置边框颜色?...

    HTML 标签的具体用法是什么?怎么用fieldset设置边框颜色?本篇文章为大家详细的介绍了HTML 标签的一些用法(有实例)和如何跟别的元素组合使用的一些技巧 HTML中fieldset标签的定义 ...

  4. HTML5 之 Fieldset 标签

    概述   fieldset 用于对表单中的控件元素进行分组.   fieldset是块级双标签,绝大多数浏览器都支持. 属性 disabled   fieldset的所有子代控件均会继承,即不可编辑状 ...

  5. html 隐藏整个fieldset,HTML: fieldset 标签

    在线示例 对表单中的相关元素进行分组: 示例html> HTML5 fieldset标签的使用(基础教程网 nhooo.com) 客户资料(nhooo.com) 名称: 地址: 电话号码: 测试 ...

  6. html5简介、选项输入框、表单元素分组、input新增属性及属性值

    HTML5简介: 定义:HTML5号称下一代HTML,html的最新版本,定义了新的标签.css.JavaScript,html5新标签IE9以上版本浏览器才兼容,因此在实际开发中要问老板是否兼容低版 ...

  7. html常用标签6-表单标签

    1.表单的初始化标签 <form action="#" method="get"><!--表单的开始--></form> 属 ...

  8. 五、jQuery 对表单、表格的操作(走过路过瞅瞅吧)

    文章目录 前言 一. 表单应用 1.1 单行文本框应用 1.2 多行文本框应用 1.3 复选框应用 1.3 下拉框应用 1.5 表单验证 二. 表格应用 2.1 表格变色 2.1.1 普通的隔行变色 ...

  9. fieldset 标签

    定义和用法 fieldset 元素可将表单内的相关元素分组. <fieldset> 标签将表单内容的一部分打包,生成一组相关表单的字段.<fieldset> 标签没有必需的或唯 ...

最新文章

  1. Python入门100题 | 第067题
  2. 首届Elastic社区技术大会隆重开幕!腾讯分享2场中文演讲
  3. getchar()和EOF
  4. 动态代理之Cglib浅析
  5. 用NSubstitute来mock
  6. 别瞎忙活:创业公司的6条时间管理策略
  7. echarts固定柱子宽度(barWidth)
  8. 6个原则、50条秘技提高HTML5应用及网站性能
  9. 「译」JavaScript 的 MVC 模式
  10. C++ 变量、常量、符号常量
  11. 苹果Mac所有端口说明,将配件连接到 Mac
  12. VS Code 运行Vue项目
  13. tortoiseHg查看后一个版本和parent版本的不同
  14. 用python编写一个点餐程序_用python写一个 点餐代码--急急急 !!! 希望高人帮忙!...
  15. 数据结构算法——1006. 线性链表的插入与删除
  16. Spring Boot 接入支付宝完整流程实战
  17. 18 亿美元!腾讯最大股东收购全球第三大程序员社区 Stack Overflow
  18. The7 v.10.2.0-中文汉化主题/可视化拖拽编辑的WordPress主题企业外贸商城网站模板
  19. 【产品经理学习笔记】Part 7 收益预估
  20. openGauss雄踞墨天轮2021年度中国数据库魔力象限领导者

热门文章

  1. 笔记本电脑连接wifi有时候会自动断网提示有限的访问权限解决办法
  2. selinux权限说明及问题解决
  3. EveryonePiano:永久免费的电脑键盘钢琴模拟软件
  4. 如何一句话证明:你在谷歌、亚麻、FB…等大厂待过?
  5. TiDB 软件和硬件环境建议配置
  6. jquery索引选择器
  7. hive:函数:length
  8. 将豆瓣读书加入到博客里
  9. Simply Static Pro - 简单静态专业版 v1.2.1
  10. 从架构角度看网络安全:数字化时代企业如何构建防御体系?