HTML标签

1.fieldset

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

<legend> 标签为 fieldset 元素定义标题。
fieldset 元素可将表单内的相关元素分组。

2.tabindex
tabindex 属性规定元素的 tab 键控制次序(当 tab 键用于导航时)。

<!DOCTYPE html>
<html>
<body>

<a href="http://www.w3school.com.cn/" tabindex="2">W3School</a><br />
<a href="http://www.google.com/" tabindex="1">Google</a><br />
<a href="http://www.microsoft.com/" tabindex="3">Microsoft</a>

<p><b>注释:</b>请尝试使用键盘上的 "Tab" 键在链接之间进行导航。</p>

</body>
</html>

用tab键进行切换的时候,首先切换到tabindex值小的元素上,上例,首先切换到Google,然后W3School,最后Microsoft

以下元素支持 tabindex 属性:<a>, <area>, <button>, <input>, <object>, <select> 以及 <textarea>。

3.autocomplete
autocomplete 属性是 HTML5 中的新属性
autocomplete 属性规定表单是否应该启用自动完成功能。
自动完成允许浏览器预测对字段的输入。当用户在字段开始键入时,浏览器基于之前键入过的值,应该显示出在字段中填写的选项。
注释:autocomplete 属性适用于 <form>,以及下面的 <input> 类型:text, search, url, telephone, email, password, datepickers, range 以及 color。

<form autocomplete="on|off">

默认为on开启

4.required
required 属性是 HTML5 中的新属性。

<form action="demo_form.asp" method="get">
  Name: <input type="text" name="usr_name" required="required" />
  <input type="submit" />
</form>

required 属性规定必需在提交之前填写输入字段。
如果使用该属性,则字段是必填(或必选)的。

注:参考http://www.w3school.com.cn/的内容

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值