利用div来操作提示面板

 
//l利用到的脚本代码:
<script language="javascript"> 

function show(ok,close) 

eval(document.all(ok)).style.display
=(eval(document.all(ok)).style.display=="none")?"":"none";  
eval(document.all(close)).style.display
=(eval(document.all(close)).style.display=="none")?"":"none";
}
 

function closeall() 

for (i=1;i<=6;i++
document.all(
"layer"+i).style.display="none"
}
 

}
 
</script>

//body代码: 注意z-index的值越大,越显示在外面。利用layer2来消失div提示。第一次加载div不显示,点击IMG后显示。

/*下面一句是按钮事件,来显示div层*/
<IMG alt="查看带有monitor_id的表" src="Images/monitor.gif" onclick="show('layer1','layer2');"
                                style
="CURSOR: hand">

<div id="layer1" style="DISPLAY: none; Z-INDEX: 105; LEFT: 1px; WIDTH: 520px; POSITION: absolute; TOP: 320px; HEIGHT: 150px; BACKGROUND-COLOR: #6cd922"
                align
="right">
                
<div id="layer2" style="DISPLAY:none;Z-INDEX:107;BACKGROUND-IMAGE:url(Images/err.gif);WIDTH:21px;CURSOR:hand;HEIGHT:21px;BACKGROUND-COLOR:#e1ec39"
                    align
="center" onClick="closeall();"><br>
                
</div>
                
<table id="kk" style="Z-INDEX:106" align="center" cellpadding="0" cellspacing="0" border="1"
                    width
="200" height="100" bordercolor="#ff9933">
                    
<caption>
                        含有monitor_id的表
                    
</caption>
                    
<tr>
                        
<td height="25" width="50">报警数据表,ca_alarm_record</td>
                        
<td height="25">线路历史表,ca_conductor_temp_history</td>
                        
<td height="25">线路即时表,ca_conductor_temperature</td>
                    
</tr>
                    
<tr>
                        
<td height="25" width="50">线路历史表3,ca_conductor_temp_history3</td>
                        
<td height="25">线路历史表2006,ca_conductor_temp_history2006</td>
                        
<td height="25">线路历史表,ca_conductor_temp_history2007</td>
                    
</tr>
                    
<tr>
                        
<td height="25" width="50">线路历史表old,ca_conductor_temp_history_old</td>
                        
<td height="25">线路设备信息表,ca_monitor_info</td>
                        
<td height="25">ca_monitor_temp_out_stat</td>
                    
</tr>
                    
<tr>
                        
<td height="25" width="50">气象站即时表,ca_weather_data</td>
                        
<td height="25">气象站历史表,ca_weather_data_history</td>
                        
<td height="25">XXXXXXXXX</td>
                    
</tr>
                
</table>
            
</div>
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IT流渊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值