<style>
.b {FILTER: progid:DXImageTransform.Microsoft.BasicImage(Rotation=0);BACKGROUND-COLOR: #EEEEEE;width:100px;height:100px}
</style>
div1
<div id=demo class=b>hehe</div>
div2
<div class=b>hehe</div>
div3
<div class=b>hehe</div>
<script>
function document.onclick(){
var e=window.event.srcElement
if(e.className=="b")with(e.filters[0])Rotation=(Rotation+1)%4
}
</script>

解决方案 »

  1.   

    function t(Divid)
    {
    document.all[Divid].style.filter=
            'progid:DXImageTransform.Microsoft.BasicImage(rotation=1)'}
      

  2.   

    代码如下:怎么做才能用一个按钮来旋转层,不是一起旋转,是当我点那个层,再点按钮,这个层旋转90度,明确的说就是我想让哪个旋转哪个就旋转,不知我说明白了没有。
    <div id="Layer1" style="position:absolute; left:99px; top:51px; width:30px; height:59px; z-index:1; background-color: #FF0000; layer-background-color: #FF0000; border: 1px none #000000"></div><div id="Layer2" style="position:absolute; left:139px; top:52px; width:30px; height:59px; z-index:1; background-color: #0000FF; layer-background-color: #0000FF; border: 1px none #000000"></div><div id="Layer3" style="position:absolute; left:178px; top:53px; width:30px; height:59px; z-index:1; background-color: #FFFF00; layer-background-color: #FFFF00; border: 1px none #000000"></div><input type="button" onclick="Layer1.style.filter=  
                   'progid:DXImageTransform.Microsoft.BasicImage(rotation=1)'  " name="button" value="Button">
      

  3.   

    <div id="Layer1" onclick=div=this style="position:absolute; left:99px; top:51px; width:30px; height:59px; z-index:1; background-color: #FF0000; layer-background-color: #FF0000; border: 1px none #000000"></div>
    <div id="Layer2" onclick=div=this style="position:absolute; left:139px; top:52px; width:30px; height:59px; z-index:1; background-color: #0000FF; layer-background-color: #0000FF; border: 1px none #000000"></div>
    <div id="Layer3" onclick=div=this style="position:absolute; left:178px; top:53px; width:30px; height:59px; z-index:1; background-color: #FFFF00; layer-background-color: #FFFF00; border: 1px none #000000"></div><input type="button" onclick="if(div)div.style.filter=  
                   'progid:DXImageTransform.Microsoft.BasicImage(rotation=1)'  " name="button" value="Button">
      

  4.   

    <div id="Layer1" onclick=div=this style="position:absolute; left:99px; top:51px; width:30px; height:59px; z-index:1; background-color: #FF0000; layer-background-color: #FF0000; border: 1px none #000000"></div>
    <div id="Layer2" onclick=div=this style="position:absolute; left:139px; top:52px; width:30px; height:59px; z-index:1; background-color: #0000FF; layer-background-color: #0000FF; border: 1px none #000000"></div>
    <div id="Layer3" onclick=div=this style="position:absolute; left:178px; top:53px; width:30px; height:59px; z-index:1; background-color: #FFFF00; layer-background-color: #FFFF00; border: 1px none #000000"></div><input type="button" onclick="try{div.style.filter=  
                   'progid:DXImageTransform.Microsoft.BasicImage(rotation=1)'}catch(e){alert('你还没选择')}  " name="button" value="Button">