摘要:
<script type="text/javascript">//哪个元素//哪个样式function getStyle(obj, attr){if(obj.currentStyle){return obj.currentStyle[attr];}else{return getComputedStyle(obj, false)[attr];}}window.onload=function (){var oDiv=document.getElementById('div1');alert(getStyle(oDiv, 'background 阅读全文