HTML标签fieldset
一个不常用的HTML标签fieldset,不过我觉得比较有意思,其语法如下:
<fieldset> <legend>fieldset名称</legend> <!-- 加入你的内容 --> </fieldset>
下面是一个代码示例:
<center> <fieldset style=" width:300px"> <legend>用户登陆</legend> <form method="post"> 帐号:<input ></input> <br><br> 密码:<input type="password" ></input> <br><br> <input type="submit" value="登陆" ></input> <input type="reset" value="重填" ></input> </form> </fieldset> </center>
代码的实际效果如下:
用户登陆帐号:
密码:
fieldset 标签 -- 对表单进行分组
- 此标签是成对出现的,以
<fieldset>
开始,以</fieldset>
结束 - 一个表单可以有多个
<fieldset>
,每对<fieldset>
为一组,每组的内容描述可以使用<legend>
说明<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>
<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>
下面是上面代码的运行结果:
用户名与密码:用户名: 密码:性别:男 女 保密我最喜爱的:计算机 旅游 购物对梦之都的意见:你对梦之都的感觉 很全面,很好 一般般吧,还要努力 有很多问题,不过还可以梦之都编程语言选择:你想在梦之都学习的编程语言 XHTML CSS JAVASCRIPT XML PHP C# JAVA C++ PERL我要在梦之都学:选择一个你在梦之都最想学的 HTML CSS javascript PHP ASP JSP Access MySQL SQLServer个人化信息:个性照片上传 联系我们 dreamer dreamdu[at]163[dot]com提交:
样式一代码如下: <fieldset style="width:300;height:150;border:2px groove" align=center></fieldset> 样式二代码如下: <fieldset style="width:300;height:150;border:2px red groove" align=center></fieldset> 样式三代码如下: <fieldset style="width:300;height:150;border:2px red groove; </fieldset> 样式四1234 代码如下: <fieldset style="width:300;height:150;border:1px dashed #ff9966" align="center" > <legend style="border:0px;"> 1234 </legend> </fieldset> 样式五1234 代码如下: <fieldset style="width:300;height:150;border:1px dashed red" align="center"> <legend style="width:100px;border:1px dashed #ff9966;text-align:center;font-family:arial;font-weight:bold"> 1234 </legend> </fieldset> 样式六 |
代码如下:
<table border=0 cellPadding=0 cellSpacing=0 align="center"> <tr><td bgcolor=#d9d9d9> <fieldset style="width:300;height:150" align=center></fieldset> </td><tr> </table>
HTML标签fieldset的更多相关文章
- 表单标签 fieldset legent
书写表单时可以提供简单样式的标签 <fieldset> <legent></legent> <input type="text" > ...
- 生僻标签 fieldset 与 legend 的妙用
谈到 <fieldset> 与 <legend>,大部分人肯定会比较陌生,在 HTML 标签中,属于比较少用的那一批. 我最早知道这两个标签,是在早年学习 reset.css ...
- 5、范围标签<fieldset></fieldset>
<fieldset style="border:0;border:1px solid red;"> <legend style="background- ...
- HTML之:fieldset——一个不常用的HTML标签
2016年4月14日17:10:02记录 一个不常用的HTML标签fieldset,不过我觉得比较有意思,其语法如下: <fieldset><legend>fieldset名称 ...
- fieldset 标签 -- 对表单进行分组
转自:https://xhmaomy-163-com.iteye.com/blog/1066977 fieldset——一个不常用的HTML标签 fieldset 标签 -- 对表单进行分组 在for ...
- 前端学习笔记之HTML body内常用标签
阅读目录 一 HTML语义化 二 字符实体 三 h系列标签 四 p标签 五 img标签 六 a标签 七 列表标签 八 table标签 九 form标签 一 HTML语义化 body中的标签是会显示到浏 ...
- Python-form表单标签
语义:标记表单 #1.什么是表单? 表单就是专门用来接收用户输入或采集用户信息的 #2.表单的格式 <form> <表单元素> </form> 链接:https:/ ...
- html 之表单,div标签等。。。。。。。
一.表单 功能:表单用于向服务器传输数据,从而实现用户与Web服务器的交互 表单能够包含input系列标签,比如文本字段.复选框.单选框.提交按钮等等. 表单还可以包含textarea.select. ...
- HTML(form标签)、CSS选择器一
一.表单标签<form> 功能:表单用于向服务器传输数据,从而实现用户与Web服务器的交互. 表单能够包含input系列标签,比如文本字段.复选框.单选框.提交按钮等等. 表单还可以包含t ...
随机推荐
- OJ题:将一个字符串顺序翻转
题目描述 写出一个程序,接受一个字符串,然后输出该字符串反转后的字符串. 之前写过这样的一个程序,用位运算的方法去操作指针,但是那样的方法未免就有点复杂啦,不如用以下这种,简单明了. 程序如下: #i ...
- Dynamics CRM 系统自定义部分的语言翻译
Dynamics CRM 自带语言切换功能,在官网下载所需语言包安装后,在设置语言中就能看到你所添加的语言,勾选要启用的语言应用即可,再打开系统设置--语言就能看到可更改用户界面语言的显示了. 但官方 ...
- Linux0.11小结
第一部分 基础内容 1.操作系统基础 操作系统是计算机硬件系统与用户程序间重要环节,理解操作系统的原理是编写优秀代码的基础.教课书中阐述的操作系统一般由5部分组成. 一个最简单的操作系统,可以 ...
- 解决UIScrollView,UIImageView等控件不能响应touch事件的问题
关于UIScrollView,UIImageView等控件不能响应touch事件,主要涉及到事件响应者链的问题,如果在UIScrollView,UIImageView等控件添加了子View,这样事件响 ...
- C++类型转化:static_cast,reinterpret_cast,dynamic_cast,const_cast
类型转换名称和语法 C风格的强制类型转换(Type Cast)很简单,不管什么类型的转换统统是: TYPE b = (TYPE)a C++风格的类型转换提供了4种类型转换操作符来应对不同场合的应用. ...
- Ext JS 5初探(三)
在上文提到了本地化文件的问题,然后在Ext JS 5的包里找了找,居然还没包含本地化包.我估计目前还不到考虑本地化的时候.在Sencha Touch中,是没有本地化包的,但是要让Ext JS也不包含本 ...
- some phrase for oral english
依我看,在我看来 I suppose that, ... As far as i'm concerned, ... As i see it, ... It seems to me that ... 1 ...
- Kotlin For Android 示例代码实战
下面就为大家介绍怎么使用Kotlin来开发Android 上面这篇中我们在下载Kotlin插件的时候也下了一个功能扩张插件,其实这个插件大有用处,它可以使得我们在不使用注解和第三方库的情况下不使用fi ...
- HBase写数据
1 多HTable并发写 创建多个HTable客户端用于写操作,提高写数据的吞吐量,一个例子: static final Configuration conf = HBaseConfiguration ...
- Java学习网站大全
Java学习网站 http://www-900.ibm.com/developerWorks/cn/java/index.shtml IBM的JAVA专题--永远的蓝色巨人 http://www.hu ...