您现在的位置: 365建站网 > 建站教程 > html5教程 > HTML <keygen> autofocus 属性

HTML <keygen> autofocus 属性

此节有 158 人学习过     参与评论

实例

当页面加载时获得焦点的 keygen 字段:

<form action="demo_keygen.asp" method="get">
Username: <input type="text" name="usr_name" />
Encryption: <keygen name="security" autofocus="autofocus" />
<input type="submit" />
</form>

亲自试一试

定义和用法

autofocus 属性规定当页面加载时,keygen 字段会自动获得焦点。

如果使用该属性,则字段会获得焦点。

HTML 4.01 与 HTML 5 之间的差异

autofocus 属性是 <keygen> 标签在 HTML5 中的新属性。

语法

<keygen autofocus="autofocus">

如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛

发表评论 (158人查看0条评论)
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
昵称:
最新评论
------分隔线----------------------------
html5教程目录

快速入口

· 365软件
· 杰创官网
· 建站工具
· 网站大全

其它栏目

· 建站教程
· 365学习

业务咨询

· 技术支持
· 服务时间:9:00-18:00
365建站网二维码

Powered by 365建站网 RSS地图 HTML地图

copyright © 2013-2024 版权所有 鄂ICP备17013400号