-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[html] 第3天 HTML全局属性(global attribute)有哪些(包含H5)? #7
Comments
|
|
全局属性:用于任何HTML5元素的属性
|
id |
是document.body.proto.__proto__里的内容么?
|
查了 MDN,感觉比 https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes |
日常用的也就一些吧,还有好多不建议使用的
|
全局属性 可用于任何 HTML 元素。
|
|
// HTMLElement 原型上的所有可枚举属性.
console.log(Object.keys(HTMLElement.prototype)); |
经常使用到的就是:title、style、class、id |
|
class id style |
width、height不是全局属性。 |
class、id、title、tableindex、data-*、lang、hidden、contenteditable、dir |
|
accesskey 规定激活元素的快捷键 |
全局属性是所有HTML元素共有的属性,它们可以用于所有元素。下面写几个常见的HTML元素通用属性,如果要查看完整的列表,MDN 全局属性列表 上面有。 常用HTML元素共有属性
|
id |
全局属性:用于任何HTML5元素的属性
|
|
全局属性列表
|
① accesskey:规定激活元素的快捷键 |
accesskey:设置快捷键 |
|
|
全局属性是所有标签都有的属性:
|
id,class,type,data,href,label,for,src,width,height,target |
accesskey 设置访问元素的键盘快捷键。 |
accesskey:生成键盘快捷键 |
|
accesskey 设置访问元素的键盘快捷键。 |
|
全局属性:用于任何HTML5元素的属性 class: 控制输入内容的自动大写方式。 |
[html] 第3天 HTML全局属性(global attribute)有哪些(包含H5)?
The text was updated successfully, but these errors were encountered: