层问题,散分一百,求助! 显示可以设置:document.getElementById("DIVID").style.zIndex=999999也就是动态设置z-index属性来进行调整顺序。把不显示的zIndex设置的小些 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 具体可参考http://msdn.microsoft.com/workshop/author/css/css_node_entry.asp 问题二,<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> <script>function a(o){x=document.getElementsByTagName("DIV")for(i=0;i<x.length;i++)x[i].style.zIndex=1o.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> 问题一,<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> 也可以<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> 看一下dreamweaver里层的设置,再转看代码. 求一条正则 查找子元素的问题 如何在lightbox 2.0中显示的大图片上点击某个点显示另外一张图片? tabel的innerHtml赋值后无法在前台显示 动态资料加入在HTML出现问题…… 关于: response.write"document.write(""内容"");"内的 ' 字符 javascript中this的用法 我着急一个基于web打印的问题:meadco ev=ev.replace(/^on/i, ''); 是什么意思? js访问数据库,我有一个单词查询程序,需要访问数据库 想自己制作浏览器!!!!! 自动把ie的 “文字大小” 设为 “中” 关于用JS验证日期的问题
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>
<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>
<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>