从新出问题:
小弟做了一个层,层里是一个TABLE,TABLE里有两行,每个<TR>里是一个iframe,总共有两个iframe,我现在给整个层加了两个事件,分别是onMouseOver="pull()"和onMouseOut="draw()",要达到的最终效果自然是鼠标放上后该层从左侧划出,离开划回去,现在在IE6和腾讯浏览器中工作的很好,可是在IE5里面,当鼠标放在层内的iframe里时,层也认为是离开本层,也会划回去,是不应该的,我怎么能解决这个问题呢??急,这个网页是给机关做的,很要命,谁有什么好办法???(不要告诉我让所有人升级IE)
注:我不能对iframe里的文件有任何的修改。
给出我的代码( 部分):<style>
<!--
#slidemenubar, #slidemenubar2{             // 定义样式
position:absolute;
left:-185px;
width:160px;
top:130px;
border:0px solid green;
background-color:;
layer-background-color:;
font:bold 12px Verdana;
line-height:20px;
}
-->
</style>
<SCRIPT language=JavaScript1.2>
if (document.all)
document.write('<div onmouseover=pull() onmouseout=draw() id="slidemenubar2" style="left:-150" >')
</SCRIPT><LAYER id=slidemenubar  left="39" top="53" width="218" height="225">    
<table  border="1" width="100%" height="100%">
  <tr>
    <td>
    <iframe  name="fraOption" height="70" src="empty.htm"      
    frameborder="0" id =fraOption width="200" 
    scrolling=no 
    style="HEIGHT: 93px; WIDTH: 200px">
    </iframe>
    </td>
  </tr>
  <tr>
    <td><iframe name="fraOption" height="70" src="empty.htm"      
    frameborder="0" id =fraOption width="200" 
    scrolling=no 
    style="HEIGHT: 93px; WIDTH: 200px"></iframe></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
</LAYER>
      
<SCRIPT language=JavaScript1.2>
function regenerate()
{
window.location.reload()
}function regenerate2()
{
if (document.layers)
setTimeout("window.onresize=regenerate",400)
}window.onload=regenerate2if (document.all)
{
document.write('</div>')
themenu=document.all.slidemenubar2.style
rightboundary=0
leftboundary=-150
}
else
{
themenu=document.layers.slidemenubar
rightboundary=150
leftboundary=10
}function pull()          //划出
{
if (window.drawit)
clearInterval(drawit)
pullit=setInterval("pullengine()",50)
}function draw()          //回去
{
clearInterval(pullit)
drawit=setInterval("drawengine()",50)
}function pullengine()
{
if (document.all&&themenu.pixelLeft<rightboundary)
themenu.pixelLeft+=5
else if(document.layers&&themenu.left<rightboundary)
themenu.left+=5
else if (window.pullit)
clearInterval(pullit)
}function drawengine()
{
if (document.all&&themenu.pixelLeft>leftboundary)
themenu.pixelLeft-=5
else if(document.layers&&themenu.left>leftboundary)
themenu.left-=5
else if (window.drawit)
clearInterval(drawit)
}
</SCRIPT>