Why the statements oDiv[i].style.z-index = arr[i][3]; didn't work? : <p>I had consoled arr[i][3] and I'm sure that it was absolutely correct，else,others statements worked and I don't know why.
The code was listed as follows</p>

<pre><code>    for(var i = 0; i&lt;oDiv.length;i++){
                arr.push([getAttr(oDiv[i],"left"),getAttr(oDiv[i],"top"),
getAttr(oDiv[i],"opacity"),getAttr(oDiv[i],"z-index")]);
                //console.log(arr);  it shows a correct value;
                }

            oBtn[0].onclick = function(){

                arr.unshift(arr[arr.length-1]);
                arr.pop();

                for (var i = 0; i&lt;arr.length; i++) {
                    oDiv[i].style.left = arr[i][0];
                    oDiv[i].style.top = arr[i][1];
                    oDiv[i].style.opacity = arr[i][2];   //these three statements worked;
                    oDiv[i].style.z-index = arr[i][3];  //it doesn't work.
                }

            }
</code></pre>
