var oDiv=document.getElementById('div1'); //alert(oDiv.style.width); //IE //alert(oDiv.currentStyle.width); //Chrome、FF //alert(getComputedStyle(oDiv, false).width); //alert(oDiv.currentStyle); if(oDiv.currentStyle) { //IE alert(oDiv.currentStyle.width); } else { //FF alert(getComputedStyle(oDiv, false).width); }