发新话题
打印

间歇性滚动代码一

间歇性滚动代码一

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0030)http://www.huaue.com/vipgk.htm -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="vipgk.files/vipcss.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript>

//Math.random()

        var scrollerheight=72;               
        var html,total_area=0,wait_flag=true;
       
        var bMouseOver = 1;
        var scrollspeed = 8;                       
        var waitingtime = 3600;               
        var s_tmp = 0, s_amount = 18.8;
        var scroll_content=new Array();
        var startPanel=0, n_panel=0, i=0;
       
        function startscroll()
        { // 胶农费 矫累
                i=0;
                for (i in scroll_content)
                        n_panel++;
                       
                n_panel = n_panel -1 ;
                startPanel = Math.round(Math.random()*n_panel);
                if(startPanel == 0)
                {
                        i=0;
                        for (i in scroll_content)
                                insert_area(total_area, total_area++);
                }
                else if(startPanel == n_panel)
                {
                        insert_area(startPanel, total_area);
                        total_area++;
                        for (i=0; i<startPanel; i++)
                        {
                                insert_area(i, total_area);
                                total_area++;
                        }
                }
                else if((startPanel > 0) || (startPanel < n_panel))
                {
                        insert_area(startPanel, total_area);
                        total_area++;
                        for (i=startPanel+1; i<=n_panel; i++)
                        {
                                insert_area(i, total_area);
                                total_area++;
                        }
                        for (i=0; i<startPanel; i++)
                        {
                                insert_area(i, total_area);
                                total_area++;
                        }
                }
                window.setTimeout("scrolling()",waitingtime);
        }
        function scrolling(){
                if (bMouseOver && wait_flag)
                {
                        for (i=0;i<total_area;i++){
                                tmp = document.getElementById('scroll_area'+i).style;
                                tmp.top = parseInt(tmp.top)-scrollspeed;
                                if (parseInt(tmp.top) <= -scrollerheight){
                                        tmp.top = scrollerheight*(total_area-1);
                                }
                                if (s_tmp++ > (s_amount-1)*scroll_content.length){
                                        wait_flag=false;
                                        window.setTimeout("wait_flag=true;s_tmp=0;",waitingtime);
                                }
                        }
                }
                window.setTimeout("scrolling()",1);
        }
        function insert_area(idx, n){
                html='<div style="left: 0px; width: 100%; position: absolute; top: '+(scrollerheight*n)+'px" id="scroll_area'+n+'">\n';
                html+=scroll_content[idx]+'\n';
                html+='</div>\n';
                document.write(html);
        }

scroll_content[0]="<TABLE cellSpacing=0 cellPadding=0 width=245 border=0><TBODY><TR><TD width=70><TABLE height=64 cellSpacing=1 cellPadding=0 width=64 bgColor=#e6e6e6 border=0><TBODY><TR><TD align=middle bgColor=#ffffff><a href='http://www.hrbeu.cn/' target='_blank'><img src='viplogo/002.gif' width='64' height='64' border='0'></a></TD></TR></TBODY></TABLE></TD><TD width=6></TD><TD vAlign=center><font color='#FF0000'><span style='font-size:9pt;line-height: 15pt'><b>【哈尔滨工程大学】</b></font><BR><a href='http://www.hrbeu.cn/' target='_blank'>国家“211工程”首批建设学校和全国重点高校之一。</a></TD></TR></TBODY></TABLE>";
scroll_content[1]="<TABLE cellSpacing=0 cellPadding=0 width=245 border=0><TBODY><TR><TD width=70><TABLE height=64 cellSpacing=1 cellPadding=0 width=64 bgColor=#e6e6e6 border=0><TBODY><TR><TD align=middle bgColor=#ffffff><a href='http://www.huaue.com/vip/xpu/' target='_blank'><img src='viplogo/007.gif' width='64' height='64' border='0'></a></TD></TR></TBODY></TABLE></TD><TD width=6></TD><TD vAlign=center><font color='#FF0000'><span style='font-size:9pt;line-height: 15pt'><b>【西安工程大学】</b></font><BR><a href='http://www.huaue.com/vip/xpu/' target='_blank'>国务院学位委员会首批批准的学士学位和硕士学位授权单位。</a></TD></TR></TBODY></TABLE>";
scroll_content[2]="<TABLE cellSpacing=0 cellPadding=0 width=245 border=0><TBODY><TR><TD width=70><TABLE height=64 cellSpacing=1 cellPadding=0 width=64 bgColor=#e6e6e6 border=0><TBODY><TR><TD align=middle bgColor=#ffffff><a href='http://www.huaue.com/vip/fjut/' target='_blank'><img src='viplogo/008.gif' width='64' height='64' border='0'></a></TD></TR></TBODY></TABLE></TD><TD width=6></TD><TD vAlign=center><font color='#FF0000'><span style='font-size:9pt;line-height: 15pt'><b>【福建工程学院】</b></font><BR><a href='http://www.huaue.com/vip/fjut/' target='_blank'>福建省人民政府举办的全日制普通本科高校。</a></TD></TR></TBODY></TABLE>";
scroll_content[3]="<TABLE cellSpacing=0 cellPadding=0 width=245 border=0><TBODY><TR><TD width=70><TABLE height=64 cellSpacing=1 cellPadding=0 width=64 bgColor=#e6e6e6 border=0><TBODY><TR><TD align=middle bgColor=#ffffff><a href='http://www.ccbupt.cn/admission/recruit.asp' target='_blank'><img src='viplogo/012.gif' width='64' height='64' border='0'></a></TD></TR></TBODY></TABLE></TD><TD width=6></TD><TD vAlign=center><font color='#FF0000'><span style='font-size:9pt;line-height: 15pt'><b>【北京邮电大学世纪学院】</b></font><BR><a href='http://www.ccbupt.cn/admission/recruit.asp' target='_blank'>教育部直属高校在北京举办的第一所本科层次独立学院。</a></TD></TR></TBODY></TABLE>";
scroll_content[4]="<TABLE cellSpacing=0 cellPadding=0 width=245 border=0><TBODY><TR><TD width=70><TABLE height=64 cellSpacing=1 cellPadding=0 width=64 bgColor=#e6e6e6 border=0><TBODY><TR><TD align=middle bgColor=#ffffff><a href='http://jgxy.xmu.edu.cn/' target='_blank'><img src='viplogo/006.gif' width='64' height='64' border='0'></a></TD></TR></TBODY></TABLE></TD><TD width=6></TD><TD vAlign=center><font color='#FF0000'><span style='font-size:9pt;line-height: 15pt'><b>【厦门大学嘉庚学院】</b></font><BR><a href='http://jgxy.xmu.edu.cn/' target='_blank'>由厦大和厦门嘉庚教育发展有限公司举办的本科层次独立学院。</a></TD></TR></TBODY></TABLE>";
scroll_content[5]="<TABLE cellSpacing=0 cellPadding=0 width=245 border=0><TBODY><TR><TD width=70><TABLE height=64 cellSpacing=1 cellPadding=0 width=64 bgColor=#e6e6e6 border=0><TBODY><TR><TD align=middle bgColor=#ffffff><a href='http://www.huaue.com/vip/yzerc/' target='_blank'><img src='viplogo/019.gif' width='64' height='64' border='0'></a></TD></TR></TBODY></TABLE></TD><TD width=6></TD><TD vAlign=center><font color='#FF0000'><span style='font-size:9pt;line-height: 15pt'><b>扬州环境资源职业技术学院</b></font><BR><a href='http://www.huaue.com/vip/yzerc/' target='_blank'>一所独立设置的国有公办普通高等专科学校。</a></TD></TR></TBODY></TABLE>";
scroll_content[6]="<TABLE cellSpacing=0 cellPadding=0 width=245 border=0><TBODY><TR><TD width=70><TABLE height=64 cellSpacing=1 cellPadding=0 width=64 bgColor=#e6e6e6 border=0><TBODY><TR><TD align=middle bgColor=#ffffff><a href='http://www.jlulambton.org/' target='_blank'><img src='viplogo/005.gif' width='64' height='64' border='0'></a></TD></TR></TBODY></TABLE></TD><TD width=6></TD><TD vAlign=center><font color='#FF0000'><span style='font-size:9pt;line-height: 15pt'><b>【吉林大学—莱姆顿学院】</b></font><BR><a href='http://www.jlulambton.org/' target='_blank'>全国首批经国务院学位办核准的中外合作办学院校之一。</a></TD></TR></TBODY></TABLE>";
startscroll();
</SCRIPT>

<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY vLink=#333333 bgColor=#ffffff LINE-HEIGHT="24px"></BODY></HTML>

TOP

正好用啊

TOP

发新话题