是我获取的方法错了么?不是很了解……新人小白,如有不当请指出们谢谢。
1
123
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
document.getElementById("change").innerHTML=asd.style.top;
这样做只能取到通过内嵌方式设置的样式值,即style属性里面设置的值。
具体看看:style、currentStyle、getComputedStyle区别介绍