fieldset——一个不常用的HTML标签

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 line-height:1.5;color:#E6DB74;">"width:300;height:150;border:1px dashed red" align="center">
   <legend line-height:1.5;color:#E6DB74;">"width:100px;border:1px dashed #ff9966;background-color:#ff0000;text-align:center;font-family:arial;font-weight:bold">
      1234
   </legend>
</fieldset>

result_1:

想了解更多关于fieldset——一个不常用的HTML标签的内容,请扫微信
或微信搜索jiemingpan

本文链接:http://www.soufuzi.com/jianzhan/1437

(0)
上一篇 2023-08-26 00:15:56
下一篇 2023-08-26 00:15:56

相关推荐

  • 静默转化率是什么意思

    静默转化率是什么: 所谓静默,就是店铺访客没有经过对话等行为,自己浏览商品后,默默下单。那么影响静默转化率的因素有价格、差评、主图、优惠。看页面上主图是否打动买家有下单的欲望,评价当中是否有中差评,设置的营销买家是否接受。 静默转化率计算公式: 静默转化率:静默成交的访客/全部静默的访客 就是直接拍下付款的客户/总IP。

    2023-02-27 17:05:29
  • 什么是亚马逊索赔?

    亚马逊索赔(Amazon Claim)是指在使用亚马逊FBA服务过程中,当卖家遇到商品遗失、损坏或由于亚马逊物流中心的操作不当导致的损失时,可以向亚马逊提交索赔请求,以求得到相应的赔偿。这一机制体现了亚马逊对卖家权益的保障,以及对自身物流服务质量的自我约束。

    2024-06-24 09:18:29