网上找了半天,结果发现使用z-index是没有用的,最后还是参考了网上的例子,使用一个iframe来挡住selected达到div不被selected挡住的效果
参见代码:
< div id ="msgdiv" style ="position:absolute; top:129px; left:229px; z-index:1;" >
< table width ="300" border ="0" cellspacing ="1" cellpadding ="2" class ="tb_table" >
< tr class ="tb_detailtr" >
< td class ="tb_td_sheng" >< span style ="float:right" onClick ="javascript:closemsg();" onMouseMove ="this.style.cursor='hand';" >< img src ="../images/icon/icon_list_close.gif" title ="关闭" ></ span >< img src ="../images/icon/Info.gif" >< strong > 系统信息 </ strong ></ td >
</ tr >
< tr >
< td class ="tb_td_qian color_blue font_bold" style ="font-size:14px;" height ="120" align ="center" >< bean:write name ="msgsus" /></ td >
</ tr >
</ table >
</ div >
// 关的时候两个都要关
function closemsg() ... {
document.getElementById('msgdiv').style.display='none';
document.getElementById('msgiframe').style.display='none';
}