<script language=JAVAscript>
<!--
// ------ 定义全局变量
var theNewsNum;
var theAddNum;
var totalNum;
var CurrentPosion=0;
var theCurrentNews;
var theCurrentLength;
var theNewsText;
var theTargetLink;
var theCharacterTimeout;
var theNewsTimeout;
var theBrowserVersion;
var theWidgetOne;
var theWidgetTwo;
var theSpaceFiller;
var theLeadString;
var theNewsState;
function startTicker()
{
// ------ 设置初始数值
theCharacterTimeout = 50;//字符间隔时间
theNewsTimeout = 2000;//新闻间隔时间
theWidgetOne = "_";//新闻前面下标符1
theWidgetTwo = "-";//新闻前面下标符
theNewsState = 1;
//theNewsNum = document.body.children.incoming.children.NewsNum.innerText;//新闻总条数
//add by lin
theNewsNum = document.getElementById("incoming").children.AllNews.children.length;//新闻总条数
theAddNum = document.getElementById("incoming").children.AddNews.children.length;//补充条数
totalNum =theNewsNum+theAddNum;
theCurrentNews = 0;
theCurrentLength = 0;
theLeadString = " ";
theSpaceFiller = " ";
runTheTicker();
}
function runTheTicker()
{
if(theNewsState == 1)
{
if(CurrentPosion<theNewsNum){
setupNextNews();
}
else{
setupAddNews();
}
CurrentPosion++;
if(CurrentPosion>=totalNum||CurrentPosion>=5) CurrentPosion=0; //最多条数不超过5条
}
if(theCurrentLength != theNewsText.length)
{
drawNews();
}
else
{
closeOutNews();
}
}
// --- 跳转下一条新闻
function setupNextNews()
{
theNewsState = 0;
theCurrentNews = theCurrentNews % theNewsNum;
theNewsText = document.getElementById("AllNews").children[theCurrentNews].children.Summary.innerText;
theTargetLink = document.getElementById("AllNews").children[theCurrentNews].children.NewsLink.innerText;
theCurrentLength = 0;
document.all.hottext.href = theTargetLink;
theCurrentNews++;
}
function setupAddNews()
{
theNewsState = 0;
theCurrentNews = theCurrentNews % theAddNum;
theNewsText = document.getElementById("incoming").children.AddNews.children[theCurrentNews].children.Summary.innerText;
theTargetLink = document.getElementById("incoming").children.AddNews.children[theCurrentNews].children.NewsLink.innerText;
theCurrentLength = 0;
document.all.hottext.href = theTargetLink;
theCurrentNews++;
}
// --- 滚动新闻
function drawNews()
{
var myWidget;
if((theCurrentLength % 2) == 1)
{
myWidget = theWidgetOne;
}
else
{
myWidget = theWidgetTwo;
}
document.all.hottext.innerHTML = theLeadString + theNewsText.substring(0,theCurrentLength) + myWidget + theSpaceFiller;
theCurrentLength++;
setTimeout("runTheTicker()", theCharacterTimeout);
}
// --- 结束新闻循环
function closeOutNews()
{
document.all.hottext.innerHTML = theLeadString + theNewsText + theSpaceFiller;
theNewsState = 1;
setTimeout("runTheTicker()", theNewsTimeout);
}
window.onload=startTicker;
//-->
</script>
<table style="background:lightskyblue;color:black;border:1px solid blue;margin-left:3px;"><tr><td><div id="visible" style="background:orange;border:1px solid grey;">梦缘溪行推荐:<a href="" id=hottext target="_blank"></a></div>
</td></tr></table>
<div id=incoming style="DISPLAY: none">
<div id=AllNews>
<div id=1>
<div id=Summary>安卓Ps完美破解版</div>
<div id=NewsLink>
http://www.tankeyun.com/ym.php?pid=90033</div></div>
<div id=2>
<div id=Summary>免流量王牌浏览器破解版</div>
<div id=NewsLink>
http://shouji.2345.com/jifen/getResource.php?from=duan&pname=baoku&uid=9886416&tgname=778773801</div></div>
<div id=3>
<div id=Summary>免流量斗地主送话费了</div>
<div id=NewsLink>
http://shouji.2345.com/jifen/getResource.php?from=duan&pname=jjlord&uid=9886416&tgname=778773801</div></div>
<div id=4>
<div id=Summary>新版酷我音乐可以免流量</div>
<div id=NewsLink>
http://shouji.2345.com/jifen/getResource.php?from=duan&pname=kuwo&uid=9886416&tgname=778773801</div></div>
<div id=5>
<div id=Summary>老牌播放器破解版什么都能看</div>
<div id=NewsLink>
http://shouji.2345.com/jifen/getResource.php?from=duan&pname=baofeng&uid=9886416&tgname=778773801</div></div>
<div id=6>
<div id=Summary>看片不卡顿的播放器</div>
<div id=NewsLink>
http://shouji.2345.com/jifen/getResource.php?from=duan&pname=sohuva&uid=9886416&tgname=778773801</div></div>
<div id=7>
<div id=Summary>免流量王牌浏览
网址和字可以自己改,以上广告全是别人的,各位可以改为自己的