javascript实现的多条新闻公告系统
公告系统
A:visited {
COLOR: #5a614a; TEXT-DECORATION: none
}
A:link {
COLOR: #5a614a; TEXT-DECORATION: none
}
A:hover {
LEFT: 1px; FONT-FAMILY: 宋体; POSITION: relative; TOP: 1px
}
BODY {
FONT-SIZE: 9pt; MARGIN: 0px; TEXT-ALIGN: left
}
=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;
//-->
-1) {
var linkName = srcElement.name;
fadein(linkName);
}
}
}
function domouseout() {
if (document.all){
srcElement = window.event.srcElement;
if (srcElement.className.indexOf("fade") > -1) {
var linkName = srcElement.name;
fadeout(linkName);
}
}
}
function makearray(n) {
this.length = n;
for(var i = 1; i 255)
return "ff";
else
return "" + hexa[Math.floor(i/16)] + hexa[i%16];}
function setbgColor(r, g, b, element) {
var hr = hex(r); var hg = hex(g); var hb = hex(b);
element.style.color = "#"+hr+hg+hb;
}
function fade(sr, sg, sb, er, eg, eb, step, direction, element){
for(var i = 0; i >>>*/
function fadeIn2(id){
fade(255,255,255, 88,118,152, 25, 1, id);
}
function fadeOut2(id){
fade(88,118,152, 255,255,255, 29, 1, id);
}
/*
公告一句话:
1.应广大热爱本站的朋友的要求,本站已正式推出了"清萍学堂",专门制作视频教程给大家参考学习。 -
2007-7-10
fq/qpxt/
2.本站第一期电子杂志"flash特效"出世了,精美的画面、精美的内容、优美动听的音乐等你欣赏。 -
2007-5-31
flash/zazhi/
3.本站下载中心和关于我们已经成功改版了,两个风格都是以古典优雅、高风侠义为表现。 - 2007-7-1
/fq/
4.长期寻求QQ空间flash、flash网站、flash片头等业务制作,价格便宜、服务周到。-
2006-10-21
images/yewu.htm
5.★强烈推荐大家一款高速稳定、透明代理,安全的英文google浏览器。 点击即可下载→
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]