特效图片转换

View Code
<table>
        <p> <a   href= "# "   id= "javascript.a ">
     <img   src= "images/cuxiao3.jpg" width= "500 "   height= "245 "   border= "0 "   id= "javascript.img "   style= "FILTER:blendTrans(duration=2) "alt="" /> </a> 
            <script language="javascript" type="text/javascript">
                        <!-- 
                        var   ImgSrc   =   new   Array();
                        ImgSrc[0]   =   "images/cuxiao3.jpg " 
                        ImgSrc[1]   =   "images/cuxiao1.jpg " 
                        ImgSrc[2]   =   "images/cuxiao2.jpg " 
                         
                        


                        for   (var   i=0;i <ImgSrc.length;i++){(new   Image()).src   =   ImgSrc[i];}//预加载图片 

                        var   ImgAlt   =   new   Array();//鼠标放上去显示的文字 
                        ImgAlt[0]   =   "图1 " 
                        ImgAlt[1]   =   "图2 " 
                        ImgAlt[2]   =   "图3 " 
                       
                        
                        var   ImgHerf   =     new   Array();//链接 
                        ImgHerf[0]   =   "# " 
                        ImgHerf[1]   =   "# " 
                        ImgHerf[2]   =   "# " 
                      
                        

                        var   step=0; 
                        function   slideit(){ 
                                var   oImg   =   document.getElementById( "javascript.img "); 
                                if   (document.all){oImg.filters.blendTrans.apply();} 
                                oImg.src=ImgSrc[step]; 
                                document.getElementById( "javascript.a ").href=ImgHerf[step]; 
                                oImg.title=ImgAlt[step]; 
                                if   (document.all){oImg.filters.blendTrans.play();} 
                                step   =   (step <(ImgSrc.length-1))?(step+1):0; 
                                (new   Image()).src   =   ImgSrc[step];//加载下一个图片 
                        } 
                        setInterval( "slideit() ",3000); 
                        //--> 
    </script> 
</p> 
    </table>

 

posted @ 2012-06-21 13:22  ComBat  阅读(127)  评论(0编辑  收藏  举报