求教下高手,我用JAVASCRIPT做了一个类似蒙板的效果,IE7可以出现效果,但是火狐和IE7以下版本的浏览器都无法实现效果,请问是为何?
源代码<script language="javascript" type="text/javascript">
var time=0;
var Opacity=0;
var x,y;
var iditem;
function MouseOver(idname,str)
{
x = document.documentElement.scrollLeft+event.x
y = document.documentElement.scrollTop+event.y

if(str=="up")
{
window.clearInterval(time)
iditem=idname;
oDiv.style.display = "block" 
         document.getElementById(iditem).style.zIndex=20;
time=window.setInterval("aa()",1); 

}
else if(str=="down")
{
window.clearInterval(time)
b1d.style.display="none"
   time = window.setInterval("bb()", 1);
document.getElementById(iditem).style.zIndex=1;
}
        
}
function aa() 

  if (Opacity == 50) 
  { 
    window.clearInterval(time)
if(x>800)
{
b1d.style.left=x-250;
b1d.style.top=y;
}
else
{
b1d.style.left=x;
b1d.style.top=y;
}
getid()
b1d.style.display="block"
    return 
  } 
  Opacity = ( Opacity + 25 ) > 50 ? 50 : Opacity + 25 
  oDiv.style.filter = "Alpha(Opacity="  + Opacity + ")" 

function bb() 

  if (Opacity == 0) 
  { 
    window.clearInterval(time)
oDiv.style.display = "none"  
    return 
  } 
  Opacity = ( Opacity - 25  < 0) ? 0 : Opacity - 25  
  oDiv.style.filter = "Alpha(Opacity="  + Opacity + ")" 

function getid()
{
switch(iditem.substr(0,3))
{
case "itm":document.getElementById("money").innerHTML="商品招标 1000RMB/月";break;
}
}
</script>