在js中 通过setAttributed设置的属性,为什么不可以通过.style.属性的方式获取呢?

在js中 通过setAttributed设置的属性,为什么不可以通过.style.属性的方式获取呢?

js中 setAttributed 设置得是 id、style这类直接得属性。而.style.属性是style下的二级属性。级别不一样。