当前位置:网站首页>Educoder Web练习题---对表单元素分组
Educoder Web练习题---对表单元素分组
2022-06-21 12:22:00 【是小鹿啊】
对表单元素分组
第1关:分组元素相关的概念
相关知识
fieldset标签
fieldset标签用于定义表单的一个子容器,将所包含的内容以边框环绕方式显示。 fieldset标签没有必需的或唯一的属性,可添加的属性有:
- name:规定fieldset的名称
- form:规定fieldset所属的一个或多个表单
- disabled:规定该组中的相关表单元素被禁用
legend标签
legend标签用于定义分组的标题,fieldset标签中的第一个元素一般是legend标签。
通关知识
1、fieldset标签用于定义(C)
A、表单的一个文本区域
B、表单的一个下拉列表
C、表单的一个子容器
D、表单的一个隐藏域
2、表单的分组标题可以用(D)设置。
A、title标签
B、summary标签
C、caption标签
D、legend标签
3、下列选项中,(A)不属于fieldset标签的属性。
A、size
B、name
C、disabled
D、form
4、下列关于表单分组的设置代码,正确的是(B)
A、
<fieldset>
<legend>请选择个人爱好
<input type="radio" name="user"/>打篮球
<input type="radio" name="user"/>打排球
</legend>
</fieldset>
B、
<fieldset>
<legend>请选择个人爱好</legend>
<input type="radio" name="user"/>打篮球
<input type="radio" name="user"/>打排球
</fieldset>
C、
<legend>
<fieldset>请选择个人爱好</fieldset>
<input type="radio" name="user"/>打篮球
<input type="radio" name="user"/>打排球
</legend>
D、
<legend>
<fieldset>请选择个人爱好
<input type="radio" name="user"/>打篮球
<input type="radio" name="user"/>打排球
</fieldset>
</legend>
第2关:对表单元素分组
相关知识
对表单进行分组
fieldset为表单的一个子容器将所包含的内容以边框环绕方式显示。 legend为fieldset边框添加相关的标题
示例如下:
<fieldset>
<legend>健康档案</legend>
<input type="text"/>身高 <br/>
<input type="text"/>体重<br/>
</fieldset>
界面效果如下:

编程要求
仿照上面的示例,在右侧编辑器中的Begin - End区域内补充代码,具体要求是:
- 在
<fieldset></fieldset>之间添加legend标签为表单的分组添加题目; - 在
<legend></legend>之间添加边框标题的设置,标题文字为“请选择个人爱好”; - 在
legend之后添加3个复选框。其name属性统一设置为“hobby”
预期输出:

通关代码
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>表单分组</title>
</head>
<body>
<form>
<!-- ********* Begin ********* -->
<fieldset>
<legend>请选择个人爱好</legend>
<input type="checkbox" required="required" name="hobby" />音乐
<input type="checkbox" required="required" name="hobby" />体育
<input type="checkbox" required="required" name="hobby" />其他
</fieldset>
<!-- ********* End ********* -->
</form>
</body>
</html>
边栏推荐
- Huawei cloud releases desktop ide codearts
- dicom格式转成nii.gz文件
- Uniapp wechat applet obtains location authorization
- [cloud native | Devops] Jenkins installation and actual combat (II)
- 3. 运算符
- STM32笔记之 PWM(脉宽调制)
- Record the errors encountered in the pytorch training model once
- Sdcc compiler + vscode to develop 8-bit microcontroller
- 8 种最坑的SQL错误用法
- 2. 数据类型
猜你喜欢

STM32cubeMX之 uart问题汇总

Phpstudy2018 installation and opening directory browsing

关于SDRAM存储器

Travel does not heal the soul

Understand UML class diagram and sequence diagram

自动弹出 微信授权登录窗口

MySQL 5.6.49 enterprise version setting password complexity policy

路由器Telnet及ACL配置

华为是如何从0到1打造以项目为中心运作的项目管理体系的?

Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection
随机推荐
phpstudy2018安装及打开目录浏览
配电室环境监控系统技术方案
愿山河无恙
7. 指针
Methods commonly used in uniapp (part) - timestamp problem and rich text parsing image problem
8 种最坑的SQL错误用法
Vs code + GDB download and debugging of STM32 development
DVWA configuration tutorial
5. 数组
Redis最大内存淘汰策略
Technical scheme for environmental monitoring system of power distribution room
一键打新债到底安不安全呀?是不是靠谱的?
TOOD: Task-aligned One-stage Object Detection
Related codes of findpanel
~~~~配置
Brief discussion on four full bonding processes of oca\uv-oca loca\sloca
动手学数据分析 数据可视化
3D Slicer导入标签与查看标签
2-zabbix automatically add hosts using autodiscover
"Forget to learn again" shell process control - 36. Introduction to the for loop