2
我想读取对象的背景属性,下面的代码我已经在Chrome中尝试过,它在工作完美,但在Mozilla中obj.style ['background']不回报什么。如何在mozilla中获取背景样式属性?object.style ['background']不能在Mozilla中工作
function flipIt(obj)
{
origImg = obj.style['background'].split(")")[0];
origImg = origImg.substring(origImg.length-5).split(".")[0];
+1 getComputedStyle,我不知道它:) –