如何判断一个层是否显示?(如果显示就ALERT一下)

bxxxr 2003-01-24 09:00:00
<DIV ID=xxdiv
oncontextmenu='window.event.returnValue=false;xxdiv.style.visibility="hidden";'
style="background-color:menu;
filter:alpha(opacity=60);
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
overflow:auto;">
</DIV>
...全文
37 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
bxxxr 2003-01-25
  • 打赏
  • 举报
回复
<script>
function demo()
{
//xxdiv.style.visibility="visible"
if(xxdiv.style.visibility!="hidden")
{alert()}
}
</script>

<DIV ID=xxdiv
oncontextmenu='window.event.returnValue=false;xxdiv.style.visibility="hidden";'
style="background-color:menu;
filter:alpha(opacity=60);
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
overflow:auto;">
<input
onclick='demo()'
type=button
value="go">
</div>
谢谢提示
fly_miss 2003-01-25
  • 打赏
  • 举报
回复

<script>
function test()
{
if (document.all.Layer1.style.display=="none")
{
alert("aa");
}
}
// -->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1;display:none"></div>
<input type="button" name="Submit" onclick="test()" value="按钮">
</body>
</html>
fly_miss 2003-01-25
  • 打赏
  • 举报
回复
if (document.all.Layer1.style.display=="none")
{
alert("aa");
}
}
// -->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1;display:none"></div>
<input type="button" name="Submit" onclick="test()" value="按钮">
</body>
</html>

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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