<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
#test{
filter:alpha(opacity=10);opacity:0.1;
 
}
</style>
<script language="javascript">
var Judge=1;
var sircal;
var op;function flash(pk,a)
{
  op=document.getElementById(pk);
 if(a)
 {  sircal=setInterval("abc()",100);
 }
else
{
 clearInterval(sircal);
  if(op.filters) op.filters.alpha.opacity=100;
  else
  {
   op.style.MozOpacity=1;
   }
}
}
function abc(){
  if(op.filters)
  {if(Judge)
     {op.filters.alpha.opacity=op.filters.alpha.opacity+10;
 //alert();
  if(op.filters.alpha.opacity==100) 
    Judge=0;
 }
   else
     {
  op.filters.alpha.opacity=op.filters.alpha.opacity-10;
  if(op.filters.alpha.opacity==0) 
    Judge=1;
 }
  }
  else
  {
  if(Judge)
      { 
  op.style.MozOpacity=op.style.MozOpacity+0.1;
  alert();
  if(op.style.MozOpacity==1) 
    Judge=0;
 }
   else
     {
  op.style.MozOpacity=op.style.MozOpacity-0.1;
  if(op.style.MozOpacity==0) 
    Judge=1;
 }
  }
 }
</script>
</head>
<body>
<div>
<img   onmouseover="flash(id,1);" onmouseout="flash(id,0)" id="test" src="eye-r.gif" />
</div>
</body>
</html>好心人帮忙该下啊,我弄了大半天了,在FF上面还是没有出现效果,大家帮帮忙啊,(你们可以改SRC图片的地址,在你们的机子运行改一下)万分感谢!!!!!!!!

解决方案 »

  1.   

    <style type="text/css">
    #test{
    filter:alpha(opacity=10);opacity:0.1;

    }
    </style> 后面为什么又用style.MozOpacity呢。
    //没试过,应该是不同属性
      

  2.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
    <title>无标题文档 </title> 
    <style type="text/css"> </style> 
    <script language="javascript"> 
    var Judge=1; 
    var sircal; 
    var op;
    var i=0.1 function flash(pk,a) 

    op=pk; 
    if(a) 

      sircal=setInterval("abc()",100); 

    else 

      clearInterval(sircal); 
      if(op.filters) op.filters.alpha.opacity=100; 
      else 
      { 
      op.style.opacity=1; 
      } 
      Judge=1

    } function abc(){    if(op.filters) 
      {
      if(Judge) 
    {
    op.filters.alpha.opacity=op.filters.alpha.opacity+10; 
    if(op.filters.alpha.opacity==100) 
    Judge=0; 

      else 

      op.filters.alpha.opacity=op.filters.alpha.opacity-10; 
      if(op.filters.alpha.opacity==0) 
      Judge=1; 

      } 
      else 
      { 
      if(!Judge) 


      op.style.opacity=i;
      i=i+0.1 
      if(op.style.opacity==1) 
      {Judge=1; i=0.1}
       } 
      else 
      { 
      op.style.opacity=op.style.opacity-0.1; 
      if(op.style.opacity==0) 
       Judge=0; 
       } 
      } 
      

    </script> 
    </head> 
    <body> 
    <div> 
    <img  onmouseover="flash(this,1);" onmouseout="flash(this,0)" id="test" src="http://hiphotos.baidu.com/qwjmys/mpic/item/691db5065867c6ef7b894793.jpg"  style="filter:alpha(opacity=10);opacity:0.1; " /> 
    </div> 
    </body> 
    </html>