var oDiv = document.getElementById(‘aa‘); if(oDiv.currentStyle){ var style = oDiv.currentStyle; alert(‘ie:‘+style.width) } else if(window.getComputedStyle) { var style = window.getComputedStyle(oDiv); alert(‘谷歌:‘+style.width) }
原文地址:https://www.cnblogs.com/liubingyjui/p/10234811.html
时间: 2024-10-06 17:30:11