1. 首页
  2. 区块链
  3. 比特币
  4. javascript 读取内联之外的样式(style、currentStyle、getComputedStyle区别介绍)

javascript 读取内联之外的样式(style、currentStyle、getComputedStyle区别介绍)

上传者: 2020-10-31 08:54:47上传 PDF文件 41KB 热度 11次
最常用的是style属性,在JavaScript中,通过document.getElementById(id).style.XXX就可以获取到XXX的值,但意外的是,这样做只能取到通过内嵌方式设置的样式值,即style属性里面设置的值。
下载地址
用户评论