2022-06-13 574
HTML <button> autofocus 属性
HTML <button> 标签
实例
按钮使用 autofocus 属性:
<button type="button" autofocus>点我!</button>
注意: Internet Explorer 9 以及更早IE版本不支持 autofocus 属性。
定义和用法
autofocus 属性是一个 boolean(布尔) 属性。
autofocus 属性规定当页面加载时按钮应当自动地获得焦点。
HTML 4.01 与 HTML5之间的差异
autofocus 属性是 HTML5 <button> 标签的新属性。
HTML 与 XHTML之间的差异
在 XHTML 中, 不允许属性简写,autofocus 属性必须定义为 <button autofocus="autofocus">。
语法
<button type="button" autofocus>
原文链接:https://77isp.com/post/1200.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态