显示可以设置:
document.getElementById("DIVID").style.zIndex=999999
也就是动态设置z-index属性来进行调整顺序。
把不显示的zIndex设置的小些

解决方案 »

  1.   

    具体可参考http://msdn.microsoft.com/workshop/author/css/css_node_entry.asp
      

  2.   

    问题二,<div id=1 style="position:absolute;width:500;height:500;"> <div id=2 style="position:absolute;width:200;height:200;left:100;top:50;"> </div> </div>
      

  3.   

    <script>
    function a(o)
    {
    x=document.getElementsByTagName("DIV")
    for(i=0;i<x.length;i++)
    x[i].style.zIndex=1
    o.style.zIndex=9999
    }
    </script>
    <div id=a0 style="position:absolute;left:0;top:0;background-color:#333333;z-index:1;width:200;height:600">
    <div id=a1 onclick="a(this)" style="position:absolute;left:10;top:10;background-color:red;z-index:11">层层层层层层层11111<p>层层层层层层层11111<p>层层层层层层层11111<p></div>
    <div id=a1 onclick="a(this)" style="position:absolute;left:30;top:30;background-color:blue;z-index:12">层层层层层层层22222<p>层层层层层层层22222<p>层层层层层层层22222<p></div>
    <div id=a1 onclick="a(this)" style="position:absolute;left:50;top:50;background-color:#00FF00;z-index:13">层层层层层层层33333<p>层层层层层层层33333<p>层层层层层层层33333<p></div>
    </div>
      

  4.   

    问题一,
    <div id=div1 onclick="t(this)" style="position:absolute;z-index:1;width:500;height:500;left:100;top:90;"> </div>
    <div id=div2 onclick="t(this)" style="position:absolute;z-index:2;width:500;height:500;left:150;top:50;"> </div>
    <div id=div3 onclick="t(this)" style="position:absolute;z-index:3;width:500;height:500;left:200;top:150;"> </div>
    <script>
    function t(e){
       var z;
       if(div1.style.zIndex > e.style.zIndex){
           z=e.style.zIndex; e.style.zIndex=div1.style.zIndex; div1.style.zIndex =z;
       }
       if(div2.style.zIndex > e.style.zIndex){
           z=e.style.zIndex; e.style.zIndex=div2.style.zIndex; div2.style.zIndex =z;
       }
       if(div3.style.zIndex > e.style.zIndex){
           z=e.style.zIndex; e.style.zIndex=div3.style.zIndex; div3.style.zIndex =z;
       }
    }
    </script>
      

  5.   

    也可以
    <div onclick="x()" id=a1 style="position:absolute;width:500;height:500;background-color:red;"> <div id=a2 style="position:absolute;width:200;height:200;left:100;top:50;background-color:blue"> </div> </div>
    脚本设置:
    <script>
    function x()
    {
    document.all.a2.style.display=(document.all.a2.style.display=="none")?"":"none"
    }
    </script>
      

  6.   

    看一下dreamweaver里层的设置,再转看代码.