tes.htm
===========================
<HTML>
<HEAD> 
<STYLE TYPE="text/css">
<!--
A.internet { text-decoration:none;color:white;font-size:10pt;font-weight:normal;font-style:normal;font-family:Courier;line-height:10pt;
}
.red {background-color:#D60027}
.black {background-color:black}.headlines {text-decoration:none;color:blue;font-size:10pt;font-weight:normal;font-style:normal;
font-family:Geneva, Arial, sans-serif;line-height:10pt;
}
-->
</STYLE><SCRIPT LANGUAGE="JavaScript">
<!--prefix=' ';arURL = new Array('http://elove.heha.net','2.html','3.html','4.html','5.html','6.html','7.html','8.html','9.html','10.html');var arTXT = new Array(
'中华人民共和国中华人民共和国',
'PanAmSat Unveils Broadcast Network, Partnerships',
'InnoMedia Bags $115.5 Million in Financing',
'Dell Opens Incubator',
'Carrier1, Star One Strike One-of-a-Kind Deal',
'Security is Serious Business at Digex',
'Excite@Home Goes Wholesale; Renews Partnerships',
'Asia Online Gets $100 Million Investment',
'Lycos Launches Incubator',
'NetSat Express Sets Up Satellite-Based ISP Services'
);interval = 50;  //  time in milliseconds to pause between each increment 
// (smaller is slower)
increment = 2; // scrolling increment, in pixels (smaller is smoother)
pause = 3500; // time to pause headline at top of scroll, in milliseconds
bannerColor = "#DDDDDD"; // background color of scroller, name or hex triplet
leftPadding = 1; // padding off of left side of scroller, in pixels
topPadding = 0; // padding off of top of scroller, in pixels
maxLoops = 10;  //  maximum loops to run scroller, 0 = infinite
target = ' TARGET="_top" ' // jump out of frames from headline
classid = ' CLASS="headlines" ' // for scrolling headlines style, same as fixed
numheadlines = 9; // number of headlines to display (up to 10)
// end banner params//-->
</SCRIPT>
</HEAD><BODY BGCOLOR="#ffffff" VLINK="#0099ff">
<center>
<TABLE CELLPADDING=3 CELLSPACING=0 BGCOLOR="#DDDDDD" BORDER=0 WIDTH=225>
<TR><TD ALIGN=CENTER><NOBR><A TARGET="_top" CLASS="internet" HREF="#"><SPAN CLASS="red">孟</SPAN><SPAN CLASS="black">宪会.COM</SPAN></A></NOBR></TD></TR>
<TR><TD><!-- Begin Headlines -->
<P><a id=ph1 name=ph1 class="headlines" TARGET="_new" 
href="0.html">Cisco Nabs Net Content Delivery Firm</a></P>
<P><a id=ph2 name=ph2 class="headlines" TARGET="_new" 
href="1.html">PanAmSat Unveils Broadcast Network, Partnerships</a></P>
<P><a id=ph3 name=ph3 class="headlines" TARGET="_new" 
href="2.html">InnoMedia Bags $115.5 Million in Financing</a></P>
<!-- End Headlines --></TD></TR>
<TR><TD ALIGN=RIGHT><A NAME=phb><IMG ALT="" SRC="/img/t.gif" WIDTH="1" HEIGHT="1"></A></TD>
</TR><TR><TD>
<TABLE WIDTH=225 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR><TD><NOBR><A TARGET="_top" CLASS="internet" HREF="#">
<SPAN CLASS="red">n</SPAN><SPAN CLASS="black">h</SPAN></A></NOBR></TD>
<TD ALIGN=RIGHT><font face="Arial, Geneva" size="1"><A TARGET="_top" HREF="#">更多新闻 &gt;</A></FONT>
</TD></TR>
</TABLE></TD></TR></TABLE><SCRIPT LANGUAGE="JavaScript1.2">
<!--
NS4=(document.layers);
IE4=(document.all);
isMac=(navigator.appVersion.indexOf("Mac")!=-1);
if(NS4||(IE4&&!isMac)){
with (document) {
write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='bannerpd.js'>");
write("<\/SCRIPT>");
}
}
//-->
</SCRIPT>
</center></BODY>
</HTML>

解决方案 »

  1.   

    bannerpd.js文件
    ==================
    <!--
    NS4=(document.layers);IE4=(document.all);
    isMac=(navigator.appVersion.indexOf("Mac")!=-1);
    if(NS4||(IE4&&!isMac)){
    finite=(maxLoops>0);
    var styleObj=(IE4)?".style":"";
    function getPH(phname){
    pHA="";
    for(i=0;i<document.anchors.length;i++){
    theA=document.anchors[i];
    if(theA.name==phname){pHA=theA;break}
    }
    return pHA //placeholding A
    }
    function getReal(xy){
    if(IE4){
    Pos=(xy=="x")?this.offsetLeft:this.offsetTop;
    tmpEl=this.offsetParent;
    while(tmpEl!=null){
    Pos+=(xy=="x")?tmpEl.offsetLeft:tmpEl.offsetTop;
    tmpEl=tmpEl.offsetParent;
    }
    }else{
    Pos=eval("this."+xy);
    }
    return Pos;
    }
    pHT=(NS4)?getPH("ph1"):document.all.ph1;
    if(pHT){
    pHT.getReal=getReal;
    var bnrLft=pHT.getReal("x")-1,bnrTop=pHT.getReal("y");
    pHB=(NS4)?getPH("phb"):document.all.phb;
    if(pHB){
    pHB.getReal=getReal;
    var bnrRit=pHB.getReal("x"),bnrBot=pHB.getReal("y");
    var bnrWid=bnrRit-bnrLft,bnrHit=bnrBot-bnrTop;
    function getObj(i){obj=eval("msg"+i+styleObj);return obj}
    onload=startBnr;
    function showMsg(n,show){
    var theEl=getObj(n);theEl.visibility=(show)?"visible":"hidden";
    }
    function nextMsg(){
    var fm=current;current=(fm==ar.length-1)?0:fm+1;
    if(current==1)loopCount++;
    if(finite&&(loopCount>=maxLoops))return;
    scrollBnr(fm,current);
    }
    function moveUp(){
    if(NS4){
    fmEl.top-=increment;
    if(toEl.top-increment<=toElTarget){
    toEl.top=toElTarget;clearInterval(intervalID);fmEl.visibility="hidden";
    timeoutID=setTimeout("nextMsg()",pause);
    }else{
    toEl.top-=increment;
    }
    }else{
    fmEl.pixelTop-=increment;
    if(toEl.pixelTop-increment<=toElTarget){
    toEl.pixelTop=toElTarget;clearInterval(intervalID);fmEl.visibility="hidden";
    timeoutID=setTimeout("nextMsg()",pause);
    }else{
    toEl.pixelTop-=increment;
    }}}
    function scrollBnr(fm,to){
    fmEl=getObj(fm);toEl=getObj(to);
    if(NS4){
    toEl.top=fmEl.top+bnrHit;toElTarget=fmEl.top;
    }else{
    toEl.pixelTop=fmEl.pixelTop+bnrHit;toElTarget=fmEl.pixelTop;
    }
    showMsg(to,true);
    intervalID=setInterval("moveUp()",interval);
    }
    function moveTo(lPos,tPos){this.style.pixelLeft=lPos;this.style.pixelTop=tPos;}
    function makeIE(){
    var text='<DIV ID="bnr" STYLE="position:absolute">';
    for(var i=ar.length-1;i>=0;i--){
    text+='<DIV ID="msg'+i+'" STYLE="position:absolute"><\/DIV>';
    }
    text+='<\/DIV>';
    document.body.insertAdjacentHTML("BeforeEnd",text);
    with(bnr.style){
    width=bnrWid;height=bnrHit;clip="rect(0 "+bnrWid+" "+bnrHit+" 0)";
    backgroundColor=bannerColor;
    }
    bnr.moveTo=moveTo;bnr.moveTo(bnrLft,bnrTop)
    for(i=0;i<ar.length;i++){
    with(eval("msg"+i+".style")){
    visibility="hidden";width=bnrWid-leftPadding;backgroundColor=bannerColor;
    }
    eval("msg"+i+".moveTo=moveTo");
    eval("msg"+i+".moveTo(leftPadding,topPadding)");
    }
    }
    function makeNS(){
    bnr=new Layer(bnrWid);
    with(bnr){
    clip.right=bnrWid;clip.bottom=bnrHit;bgColor=bannerColor;
    moveTo(bnrLft,bnrTop);visibility="show";
    }
    for(var i=0;i<ar.length;i++){
    eval("msg"+i+"="+"new Layer(bnrWid-leftPadding, bnr)");
    with(eval("msg"+i)) {
    moveTo(leftPadding,topPadding);bgColor=bannerColor;
    }}}
    function fillBnr(){
    var theEl;
    for(i=0;i<ar.length;i++){
    theEl=eval("msg"+i);
    newsStr="<A " +target+classid+
    " HREF="+ar[newsCount][0]+">"+ar[newsCount][1]+"<\/A>";
    if(NS4){
    with(theEl.document){write(newsStr);close();}
    }else{theEl.innerHTML=newsStr;}
    newsCount++;if(newsCount==ar.length)newsCount=0;
    }}
    function startBnr(){
    ar=new Array();
    if(!window.arURL)return;if(arURL.length==0)return;
    if(arURL.length<numheadlines)numheadlines=arURL.length; 
    for(i=0;i<numheadlines;i++){ar[i]=new Array(prefix+arURL[i],arTXT[i]);}
    newsCount=0;if(finite)loopCount=0;
    (NS4)?makeNS():makeIE();
    fillBnr();showMsg(0,true);current=0;
    window.onresize=reDo;timeoutID=setTimeout("nextMsg()",pause);
    }
    function reDo(){window.location.reload();}
    }}}
    //-->
      

  2.   

    bannerpd.js文件
    ==================
    <!--
    NS4=(document.layers);IE4=(document.all);
    isMac=(navigator.appVersion.indexOf("Mac")!=-1);
    if(NS4||(IE4&&!isMac)){
    finite=(maxLoops>0);
    var styleObj=(IE4)?".style":"";
    function getPH(phname){
    pHA="";
    for(i=0;i<document.anchors.length;i++){
    theA=document.anchors[i];
    if(theA.name==phname){pHA=theA;break}
    }
    return pHA //placeholding A
    }
    function getReal(xy){
    if(IE4){
    Pos=(xy=="x")?this.offsetLeft:this.offsetTop;
    tmpEl=this.offsetParent;
    while(tmpEl!=null){
    Pos+=(xy=="x")?tmpEl.offsetLeft:tmpEl.offsetTop;
    tmpEl=tmpEl.offsetParent;
    }
    }else{
    Pos=eval("this."+xy);
    }
    return Pos;
    }
    pHT=(NS4)?getPH("ph1"):document.all.ph1;
    if(pHT){
    pHT.getReal=getReal;
    var bnrLft=pHT.getReal("x")-1,bnrTop=pHT.getReal("y");
    pHB=(NS4)?getPH("phb"):document.all.phb;
    if(pHB){
    pHB.getReal=getReal;
    var bnrRit=pHB.getReal("x"),bnrBot=pHB.getReal("y");
    var bnrWid=bnrRit-bnrLft,bnrHit=bnrBot-bnrTop;
    function getObj(i){obj=eval("msg"+i+styleObj);return obj}
    onload=startBnr;
    function showMsg(n,show){
    var theEl=getObj(n);theEl.visibility=(show)?"visible":"hidden";
    }
    function nextMsg(){
    var fm=current;current=(fm==ar.length-1)?0:fm+1;
    if(current==1)loopCount++;
    if(finite&&(loopCount>=maxLoops))return;
    scrollBnr(fm,current);
    }
    function moveUp(){
    if(NS4){
    fmEl.top-=increment;
    if(toEl.top-increment<=toElTarget){
    toEl.top=toElTarget;clearInterval(intervalID);fmEl.visibility="hidden";
    timeoutID=setTimeout("nextMsg()",pause);
    }else{
    toEl.top-=increment;
    }
    }else{
    fmEl.pixelTop-=increment;
    if(toEl.pixelTop-increment<=toElTarget){
    toEl.pixelTop=toElTarget;clearInterval(intervalID);fmEl.visibility="hidden";
    timeoutID=setTimeout("nextMsg()",pause);
    }else{
    toEl.pixelTop-=increment;
    }}}
    function scrollBnr(fm,to){
    fmEl=getObj(fm);toEl=getObj(to);
    if(NS4){
    toEl.top=fmEl.top+bnrHit;toElTarget=fmEl.top;
    }else{
    toEl.pixelTop=fmEl.pixelTop+bnrHit;toElTarget=fmEl.pixelTop;
    }
    showMsg(to,true);
    intervalID=setInterval("moveUp()",interval);
    }
    function moveTo(lPos,tPos){this.style.pixelLeft=lPos;this.style.pixelTop=tPos;}
    function makeIE(){
    var text='<DIV ID="bnr" STYLE="position:absolute">';
    for(var i=ar.length-1;i>=0;i--){
    text+='<DIV ID="msg'+i+'" STYLE="position:absolute"><\/DIV>';
    }
    text+='<\/DIV>';
    document.body.insertAdjacentHTML("BeforeEnd",text);
    with(bnr.style){
    width=bnrWid;height=bnrHit;clip="rect(0 "+bnrWid+" "+bnrHit+" 0)";
    backgroundColor=bannerColor;
    }
    bnr.moveTo=moveTo;bnr.moveTo(bnrLft,bnrTop)
    for(i=0;i<ar.length;i++){
    with(eval("msg"+i+".style")){
    visibility="hidden";width=bnrWid-leftPadding;backgroundColor=bannerColor;
    }
    eval("msg"+i+".moveTo=moveTo");
    eval("msg"+i+".moveTo(leftPadding,topPadding)");
    }
    }
    function makeNS(){
    bnr=new Layer(bnrWid);
    with(bnr){
    clip.right=bnrWid;clip.bottom=bnrHit;bgColor=bannerColor;
    moveTo(bnrLft,bnrTop);visibility="show";
    }
    for(var i=0;i<ar.length;i++){
    eval("msg"+i+"="+"new Layer(bnrWid-leftPadding, bnr)");
    with(eval("msg"+i)) {
    moveTo(leftPadding,topPadding);bgColor=bannerColor;
    }}}
    function fillBnr(){
    var theEl;
    for(i=0;i<ar.length;i++){
    theEl=eval("msg"+i);
    newsStr="<A " +target+classid+
    " HREF="+ar[newsCount][0]+">"+ar[newsCount][1]+"<\/A>";
    if(NS4){
    with(theEl.document){write(newsStr);close();}
    }else{theEl.innerHTML=newsStr;}
    newsCount++;if(newsCount==ar.length)newsCount=0;
    }}
    function startBnr(){
    ar=new Array();
    if(!window.arURL)return;if(arURL.length==0)return;
    if(arURL.length<numheadlines)numheadlines=arURL.length; 
    for(i=0;i<numheadlines;i++){ar[i]=new Array(prefix+arURL[i],arTXT[i]);}
    newsCount=0;if(finite)loopCount=0;
    (NS4)?makeNS():makeIE();
    fillBnr();showMsg(0,true);current=0;
    window.onresize=reDo;timeoutID=setTimeout("nextMsg()",pause);
    }
    function reDo(){window.location.reload();}
    }}}
    //-->
      

  3.   

    用ASP很好写,每分钟刷一次页面,每次随机读数据库中的一条记录显示出来就好*****
    打工好辛苦
    *****
    钞票好难赚
    *****
    编程好伤神
    *****
    光阴好易混
    *****