attribute与property的区别?

简介: 前端面试

attribute是dom元素在文档中作为html标签拥有的属性
property是dom元素在js中作为对象拥有的属性。
所以,对于html的标准属性来说,attribute和property是同步的,是会自动更新的。但对于自定义属性,他们不同步。

相关文章
|
Java 数据库连接 mybatis
There is no getter for property named ‘null‘ in ‘class
There is no getter for property named ‘null‘ in ‘class
183 0
There is no getter for property named ‘null‘ in ‘class
|
Java 数据库连接 mybatis
mybatis报错:Type handler was null on parameter mapping or property ‘__frch_xxx_0’
mybatis报错:Type handler was null on parameter mapping or property ‘__frch_xxx_0’
2073 0
mybatis报错:Type handler was null on parameter mapping or property ‘__frch_xxx_0’
|
TensorFlow 算法框架/工具
has no attribute ‘swish‘
has no attribute ‘swish‘
158 0
|
C语言 编译器 C++
|
C# 编译器 机器人
|
C语言 编译器 开发者