代码如下: var head = document.getElementById( “box” ); // alert( head.style.background ) // alert( head.style.cssFloat || head.style.styleFloat ) // 获取float不一样 // head.style.fontSize = “30px” head.style.color = “#f00”; // (typeof head.style.cssFloat != “