经常使用obj.style.xxx = ""或者xx = obj.style.xxx
只是对某个属性进行get或set
如果要对style的所有属性进行get或set那得怎么做?
obj.style=""? xxx= obj.style?
no obj.style 也是一个obj
具体 得用 obj.style.cssText ="color:#ff0000;border:1px solid #008800";
或xxx = obj.style.cssText;
本文详细介绍了如何在JavaScript中一次性获取或设置多个CSS样式属性,包括使用`obj.style`和`cssText`方法的技巧。
经常使用obj.style.xxx = ""或者xx = obj.style.xxx
只是对某个属性进行get或set
如果要对style的所有属性进行get或set那得怎么做?
obj.style=""? xxx= obj.style?
no obj.style 也是一个obj
具体 得用 obj.style.cssText ="color:#ff0000;border:1px solid #008800";
或xxx = obj.style.cssText;

被折叠的 条评论
为什么被折叠?
