呵呵,我不知道具体是否可行,VML还是比较奇怪的

解决方案 »

  1.   

    可行!
    谢谢  sw47(动感超人,哇哈哈哈哈)和 liuruhong(蓝色街灯) !
    <HTML xmlns:v>
    <STYLE>
    v\:*{behavior:url(#default#VML);} //声明变量v为VML对象
    </STYLE>
    <BODY><form name=form1>
    <v:rect id="myrect" style="Z-INDEX:1;LEFT:163px;WIDTH:198px;POSITION:absolute;TOP:139px;HEIGHT:158px" fillcolor="#007878" strokecolor="#f00103" strokeweight="10pt">
    </v:rect>
    <v:polyline id="mypolyline" style="Z-INDEX:2;POSITION:absolute;" points="60,0 100,100 100,200 200,200">
    </v:polyline>
    <input type=button onclick="test()">
    <SCRIPT LANGUAGE="javaScript">
    function test(){
    var temp
    temp=document.all.mypolyline.style.zIndex
    document.all.mypolyline.style.zIndex=document.all.myrect.style.zIndex
    document.all.myrect.style.zIndex=temp
    }
    </SCRIPT>