- 爱易网页
-
ASP.NET教程
- ASP.NET显示层的有关问题(很奇怪)
日期:2014-05-18 浏览次数:20470 次
ASP.NET显示层的问题(很奇怪)
下面这段代码是写在ASP.NET页面里控制层显示的
<script language= "javascript " type= "text/javascript ">
<!--
function disp(i)
{
for(j=1;j <3;j++)
{
if(j==i)
{
document.getElementById( "Div "+j).style.visibility = "visible ";
}
else
{
document.getElementById( "Div "+j).style.visibility = "hidden ";
}
}
}
-->
</script>
<style type= "text/css ">
<!--
#Div1 {
position:absolute;
z-index:1;
visibility: visible;
}
#Div2 {
position:absolute;
z-index:2;
visibility: hidden;
}
-->
</style>
<body>
<form id= "form1 " runat= "server ">
<table>
<tr>
<td>
<a href= "# " onmouseover= "disp( '1 ') "> a </a>
<a href= "# " onmouseover= "disp( '2 ') "> b </a>
</td>
</tr>
<tr>
<td>
<div id= "div1 ">
公告栏层结束
</div>
<div id= "div2 ">
fangchang层结束
</div>
</td>
</tr>