Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Jul 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help me! coding! about IE filters not effect

    Code:
    <!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">
    #frame {
    	width:352px;
    	height:226px;
    	overflow:hidden;
    	position:absolute;
    	left: 116px;
    	top: 22px;
    		
    	
    }
    #framediv { margin-left:0px;}
    #ul { width:2500px; margin:0px; padding:0px;}
    #ul li { float:left; list-style:none;}
    </style>
    
    <SCRIPT type="text/javascript">
    var i = 0;
    var j;
    
    function a() {
        
        if(this.x==-55*30){ 
    	 e();
    	}
        var oDiv = document.getElementById("framediv");
    	setOpacity(oDiv,100);
    	i--;
    	this.x = 30*i;
    	j=i;
    	
    	
    	if (this.x%330==0) {return}
    	
    	oDiv.style.marginLeft = (this.x)+ "px";
    	
    	 this.w = setTimeout("a();",5);
    	 var p = document.getElementById("ul");
    p.onmouseover = function (){
    clearInterval(t);
       }
    p.onmouseout = function (){
    t = setInterval("a();",2000);
       }
    	
    	 
    	}
    function b() {
    var oDiv = document.getElementById("framediv");
         j--;
    	 this.y = 30*j;
    	 i=j;
    	 if (j==0){i=0;}
    	 if (this.y%330==0 && j!=585) {return}
    	 oDiv.style.marginLeft = "-"+(this.y)+ "px";
    	 this.v = setTimeout("b();",5); 
    	}
    	
    function e() {
    var oDiv = document.getElementById("framediv");
       
    setOpacity(oDiv,20);
        i++;
    	this.z = 30*i;
    	if(oDiv.style.marginLeft == 0+ "px"){i=0;return setOpacity(oDiv,100); }
    	
    	oDiv.style.marginLeft = (this.z)+ "px";
    	m = setTimeout("e();",5);
    }
    
    var t = setInterval("a();",2000);
    
    function d(){
          clearInterval(t);
    }
    function setOpacity (elem,level) {
        
        if (elem.filters)
    	    {elem.style.filter = 'alpha(opacity=' + level +')';}
    	else 
    	    elem.style.opacity = level/100;
    }
    
    
    </SCRIPT>
    </head>
    
    <body id="f">
    
    <div id="frame">
      <div id="framediv">
        <ul id="ul">
    	  <li><img src="http://rryqszq4.atbhost.net/test/images/qys_01.jpg" height="226" width="351" /></li>
    	  <li><img src="http://rryqszq4.atbhost.net/test/images/qys_02.jpg" height="226" width="351" /></li>
    	  <li><img src="http://rryqszq4.atbhost.net/test/images/qys_03.jpg" height="226" width="351"/></li>
    	  <li><img src="http://rryqszq4.atbhost.net/test/images/qys_04.jpg" height="226" width="351"/></li>
    	  <li><img src="http://rryqszq4.atbhost.net/test/images/qys_05.jpg" height="226" width="351"/></li>
    	  <li><img src="http://rryqszq4.atbhost.net/test/images/qys_06.jpg" height="226" width="351"/></li>
    	</ul>
      </div>
    </div>
    
    </body>
    
    <script language="javascript">
    
    </script>
    </html>
    IE filters not effect,but FF can be used,i could find some reasons, help!
    Last edited by rryqszq4; 07-24-2009 at 06:40 AM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •