fieldset和legend标签的属性和使用方法

 
<fieldset>除了可以用style设定他的样式以外,谁知道他还有什么其他纯html中自代的属性吗?
</fieldset>
<fieldset><legend>基本信息</legend> </fieldset>

<fieldset id=b><legend id=a><span style="width:150;filter:shadow(color=ffedff)">意想不到的效果不错</span></legend><small><p>不知道他还有其他的属性吗?</small></fieldset>

<fieldset><legend accesskey="F" align="center">Fieldset的属性:</legend>
<div style="word-break:break-all;font-size:12px;line-height:16px;padding:10px;">
CLASS=classname<br>
ID=value<br>
LANG=language<br>
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS <br>
STYLE=css1-properties<br>
TITLE=text<br>
EVENT = script<br>
</div></fieldset>
<fieldset><legend accesskey="L" align="center">Legend的属性:</legend>
<div style="word-break:break-all;font-size:12px;line-height:16px;padding:10px;">
ALIGN=BOTTOM | CENTER | LEFT | RIGHT | TOP<br>
CLASS=classname<br>
ID=value<br>
LANG=language<br>
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS<br>
STYLE=css1-properties<br>
TITLE=text<br>
VALIGN=BOTTOM | TOP<br>
EVENT= script<br>
</div></fieldset>


此标签是成对出现的,以<fieldset>开始,以</fieldset>结束
一个表单可以有多个<fieldset>,每对<fieldset>为一组,每组的内容描述可以使用<legend>说明
<form action="dreamdu.php" method="post" enctype="multipart/form-data" id="dreamdu">
<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>
<input type="radio" value="1" id="sex" />
<label for="boy">男</label>
<input type="radio" value="2" id="sex" />
<label for="girl">女</label>
<input type="radio" value="3" id="sex" />
<label for="sex">保密</label>
</fieldset>
<fieldset>
<legend>我最喜爱的:</legend>
<input type="checkbox" value="1" id="fav" />
<label for="computer">计算机</label>
<input type="checkbox" value="2" id="fav" />
<label for="trval">旅游</label>
<input type="checkbox" value="3" id="fav" />
<label for="buy">购物</label>
</fieldset>
<fieldset>
<legend>对梦之都的意见:</legend>
<label for="select">你对梦之都的感觉</label>
<select size="1" id="select">
<option>很全面,很好</option>
<option>一般般吧,还要努力</option>
<option>有很多问题,不过还可以</option>
</select>
</fieldset>
<fieldset>
<legend>梦之都编程语言选择:</legend>
<label for="multipleselect">你想在梦之都学习的编程语言</label>
<select size="10" multiple="multiple" id="multipleselect">
<option>XHTML</option>
<option>CSS</option>
<option>JAVASCRIPT</option>
<option>XML</option>
<option>PHP</option>
<option>C#</option>
<option>JAVA</option>
<option>C++</option>
<option>PERL</option>
</select>
</fieldset>
<fieldset>
<legend>我要在梦之都学:</legend>
<label for="WebDesign">选择一个你在梦之都最想学的</label>
<select id="WebDesign">
<optgroup label="client">
<option value="HTML">HTML</option>
<option value="CSS">CSS</option>
<option value="javascript">javascript</option>
</optgroup>
<optgroup label="server">
<option value="PHP">PHP</option>
<option value="ASP">ASP</option>
<option value="JSP">JSP</option>
</optgroup>
<optgroup label="database">
<option value="Access">Access</option>
<option value="MySQL">MySQL</option>
<option value="SQLServer">SQLServer</option>
</optgroup>
</select>
</fieldset>
<fieldset>
<legend>个人化信息:</legend>
<label for="myimage">个性照片上传</label>
<input type="file" id="myimage" size="35" maxlength="255" />
<label for="contactus">联系我们</label>
<textarea cols="50" rows="10" id="contactus">
dreamer dreamdu[at]163[dot]com
</textarea>
</fieldset>
<fieldset>
<legend>提交:</legend>
<input type="submit" value="submit" id="submit" />
<input type="reset" value="reset" id="reset" />
</fieldset>
</form>
2007-02-28 21:09


第2楼 作者:222.212.193.*** 发表时间:2007-6-13 10:21:24 回复 顶部 列表
HTML FIELDSET LEGEND标记
<fieldset>标记定义了一个表单控件组,通过将相关联的控件分组,可以把表单分为更小,更易于管理。<fieldset>标记必须以<legend>开头,以提供控件组的标题,在<legend>后可包含任何行内标记或者块标记,甚至嵌套<fieldset>。

<legend>标记定义该控件组的标题,且必须在<fieldset>标记中。它的accesskey属性定义了按钮的单字快捷键,使用户能够更快的跳到目标控件组。

例如:

<fieldset>除了可以用style设定他的样式以外,谁知道他还有什么其他纯html中自代的属性吗?
</fieldset>
<fieldset><legend>基本信息</legend> </fieldset>

<fieldset id=b><legend id=a><span style="width:150;filter:shadow(color=ffedff)">意想不到的效果不错</span></legend><small><p>不知道他还有其他的属性吗?</small></fieldset>

<fieldset><legend accesskey="F" align="center"><u>F</u>ieldset的属性</legend>
<div style="word-break:break-all;font-size:12px;line-height:16px;padding:10px;">
CLASS=classname<br>
ID=value<br>
LANG=language<br>
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS <br>
STYLE=css1-properties<br>
TITLE=text<br>
EVENT = script<br>
</div></fieldset>
<fieldset><legend accesskey="L" align="center"><u>L</u>egend的属性</legend>
<div style="word-break:break-all;font-size:12px;line-height:16px;padding:10px;">
<label accesskey="U"><u>U</u>uu: <input type="test" name="isaac" size="10" maxlength="15"></label><br>
ALIGN=BOTTOM | CENTER | LEFT | RIGHT | TOP<br>
CLASS=classname<br>
ID=value<br>
LANG=language<br>
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS<br>
STYLE=css1-properties<br>
TITLE=text<br>
VALIGN=BOTTOM | TOP<br>
EVENT= script<br>
</div></fieldset>

显示效果为:


除了可以用style设定他的样式以外,谁知道他还有什么其他纯html中自代的属性吗?基本信息 意想不到的效果不错不知道他还有其他的属性吗?
Fieldset的属性
CLASS=classname
ID=value
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
STYLE=css1-properties
TITLE=text
EVENT = script
Legend的属性
Uuu:
ALIGN=BOTTOM | CENTER | LEFT | RIGHT | TOP
CLASS=classname
ID=value
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
STYLE=css1-properties
TITLE=text
VALIGN=BOTTOM | TOP
EVENT= script

转载于:https://www.cnblogs.com/deve/archive/2011/12/23/2569206.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值