关于一个层怎么现实在另外一个层上面

a8509190 2012-01-12 12:18:45

图片不知道能不能看到 我在做一个QQ注册页面 打开腾讯的QQ注册页面 点击年这个文本款 会出现一个层有很多年份给你选择,但是我点击出来的这个层会被下面的文本框挡住,如何向腾讯一样不被挡住,我试了z-index不行,而且腾讯貌似也没用这个!求解!最好能加我QQ帮解答下80286048
...全文
80 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
devmiao 2012-01-12
  • 打赏
  • 举报
回复
图片看不到哦

看看这里 http://w3help.org/zh-cn/kb/013/ 希望能帮助到你啊,喵~
  • 打赏
  • 举报
回复
显现弹出一层窗体:如下

// JScript 文件
function ShowDialog(nWidth, nHeight, strUrl, strTitleName)
{
var mydiv=document.getElementById("fcolor");
var nHeight=nHeight;
var scolor=getCurrentStyle(mydiv, "backgroundColor", "background-color");
/*ie6*/
if(scolor=="#0000ff")
{
nHeight=nHeight-10;
}/*ie7*/
else if(scolor=="#ff0000")
{
nHeight=nHeight+10;
document.getElementById("iframeDialog").style.height = nHeight-21+"px";
}/*firefox*/
else if(scolor=="rgb(0, 255, 0)")
{
nHeight=nHeight+10;
document.getElementById("iframeDialog").style.height = nHeight-21+"px";
}
else
{
nHeight=nHeight+10;
document.getElementById("iframeDialog").style.height = nHeight-21+"px";
}

document.getElementById("divDialog").style.display = "block";
document.getElementById("divDialog").style.visibility = "visible";
document.getElementById("divDialog").style.top = (window.screen.height/2-nHeight/2)/2-23+"px";
document.getElementById("divDialog").style.left = (window.screen.width/2-nWidth/2)+"px";
document.getElementById("divDialog").style.width = nWidth+"px";
document.getElementById("divDialog").style.height = nHeight+"px";
var fid=document.getElementById("hfActiveWin").value;
var num=Math.round(Math.random()*10000);
if(strUrl.indexOf('?')!=-1){strUrl+="&a="+num+"&fid="+fid}else{strUrl+="?a="+num+"&fid="+fid;}
document.getElementById("iframeDialog").src = strUrl;
document.getElementById("divTitleName").innerHTML = strTitleName;
document.getElementById("divTitleName").style.width = nWidth-50+"px";

document.getElementById("divBackground").style.width = "100%";
document.getElementById("divBackground").style.height = "100%";
document.getElementById("divBackground").style.display = "block";
document.getElementById("divBackground").style.visibility = "visible";
document.getElementById("divBackground").style.top = "0px";
document.getElementById("divBackground").style.left = "0px";

Sethidden1();
}

其次,窗体上弹出窗体:如下
[code=JScript]
function ShowDialog1(nWidth, nHeight, strUrl, strTitleName)
{
var mydiv=document.getElementById("fcolor");
var nHeight=nHeight;
var scolor=getCurrentStyle(mydiv, "backgroundColor", "background-color");
/*ie6*/
if(scolor=="#0000ff")
{
nHeight=nHeight-10;
}/*ie7*/
else if(scolor=="#ff0000")
{
nHeight=nHeight+10;
document.getElementById("iframeDialog1").style.height = nHeight-21+"px";
}/*firefox*/
else if(scolor=="rgb(0, 255, 0)")
{
nHeight=nHeight+10;
document.getElementById("iframeDialog1").style.height = nHeight-21+"px";
}else
{
nHeight=nHeight+10;
document.getElementById("iframeDialog1").style.height = nHeight-21+"px";
}
document.getElementById("divDialog1").style.display = "block";
document.getElementById("divDialog1").style.visibility = "visible";
document.getElementById("divDialog1").style.top = (window.screen.height/2-nHeight/2)/2-23+"px";
document.getElementById("divDialog1").style.left = (window.screen.width/2-nWidth/2)+"px";
document.getElementById("divDialog1").style.width = nWidth+"px";
document.getElementById("divDialog1").style.height = nHeight+"px";
var num=Math.round(Math.random()*10000);
if(strUrl.indexOf('?')!=-1){strUrl+="&a="+num}else{strUrl+="?a="+num;}
document.getElementById("iframeDialog1").src="about:blank";
document.getElementById("iframeDialog1").src = strUrl;
document.getElementById("divTitleName1").innerHTML = strTitleName;
document.getElementById("divTitleName1").style.width = nWidth-50+"px";

document.getElementById("divBackground1").style.width = "100%";
document.getElementById("divBackground1").style.height = "100%";
document.getElementById("divBackground1").style.display = "block";
document.getElementById("divBackground1").style.visibility = "visible";
document.getElementById("divBackground1").style.top = "0px";
document.getElementById("divBackground1").style.left = "0px";
}


[/code]
naonaoye 2012-01-12
  • 打赏
  • 举报
回复
写在那个层里面

62,041

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧