给你两种方式。
第一:不实现你的的那个界面,换一种界面,即让新闻图片滚动,用html中的marquee,网上都有相关内容可以学习;
第二:实现你的界面,用JS;
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<HTML xmlns="http://www.
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<base target="_blank" />
<meta name="keywords" content="NBA,nba,NBA常规赛,nba常规赛,火箭,0405赛季NBA常规赛,姚明,NBA记录,比分直播,NBA积分榜,NBA赛程">
<meta name="description"
content="NBA","NBA火热赛事","NBA图片","火箭-姚明","NBA热点新闻","NBA每日综述","NBA辩论","NBA评论","NBA排行榜","NBA技
术统计","王治郅-热队","NBA论坛">
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
<link href="http://sports. rel="stylesheet" type="text/css" />
<link href="http://cimg2. rel="stylesheet" type="text/css" />
<link href="http://sports. rel="stylesheet" type="text/css" /></head>
<div class="col3">
<script language="javascript">
var nn;
nn=1;
setTimeout('change_img12()',6000);
function change_img12()
{
if(nn>4) nn=1
setTimeout('setFocus12('+nn+')',6000);
nn++;
tt=setTimeout('change_img12()',6000);
}
function setFocus12(i)
{
selectLayer12(i);
}
function selectLayer12(num)
{
for(var id = 1;id<=4;id++)
{
var ss="focusPic"+id;
if(id==num)
document.getElementById(ss).style.display="block";
else
document.getElementById(ss).style.display="none";
}
}
</script>
<div class="focusPic" id="focusPic1" style="display:block">
<div class="pic">
<a href="#"><img src="#" alt="AA" width="280" height="390" border="0" /></a>
</div>
<div class="text">
<h2><a href="#" class="cWhite">AA</a></h2>
<span><img src="#" alt="BB" width="42" height="25" border="0" /></span>
</div>
<div class="textNum">
<div class="num bg1">
<ul>
<li>1</li><li><a href="javascript:setFocus12(2);" target="_self">2</a></li><li><a href="javascript:setFocus12(3);" target="_self">3</a></li><li><a href="javascript:setFocus12(4);" target="_self">4</a></li>
</ul>
</div>
</div>
</div>
<div class="focusPic" id="focusPic2" style="display:none">
<div class="pic">
<a href="#"><img src="#" alt="CC" width="280" height="390" border="0" /></a>
</div>
<div class="text">
<h2><a href="#" class="cWhite">CC</a></h2>
<span><img src="#" alt="BB" width="42" height="25" border="0" /></span>
</div>
<div class="textNum">
<div class="num bg2">
<ul>
<li><a href="javascript:setFocus12(1);" target="_self">1</a></li><li>2</li><li><a href="javascript:setFocus12(3);" target="_self">3</a></li><li><a href="javascript:setFocus12(4);" target="_self">4</a></li>
</ul>
</div>
</div>
</div>
<div class="focusPic" id="focusPic3" style="display:none">
<div class="pic">
<a href="#"><img src="#" alt="DD" width="280" height="390" border="0" /></a>
</div>
<div class="text">
<h2><a href="#" class="cWhite">DD</a></h2>
<span><img src="#" alt="BB" width="42" height="25" border="0" /></span>
</div>
<div class="textNum">
<div class="num bg3">
<ul>
<li><a href="javascript:setFocus12(1);" target="_self">1</a></li><li><a href="javascript:setFocus12(2);" target="_self">2</a></li><li>3</li><li><a href="javascript:setFocus12(4);" target="_self">4</a></li>
</ul>
</div>
</div>
</div>
<div class="focusPic" id="focusPic4" style="display:none">
<div class="pic">
<a href="#"><img src="#" alt="EE" width="280" height="390" border="0" /></a>
</div>
<div class="text">
<h2><a href="#" class="cWhite">FF</a></h2>
<span><img src="#" alt="BB" width="42" height="25" border="0" /></span>
</div>
<div class="textNum">
<div class="num bg4">
<ul>
<li><a href="javascript:setFocus12(1);" target="_self">1</a></li><li><a href="javascript:setFocus12(2);" target="_self">2</a></li><li><a href="javascript:setFocus12(3);" target="_self">3</a></li><li>4</li>
</ul>
</div>
</div>
</div>
</body>
</html>
第一:不实现你的的那个界面,换一种界面,即让新闻图片滚动,用html中的marquee,网上都有相关内容可以学习;
第二:实现你的界面,用JS;
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<HTML xmlns="http://www.
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<base target="_blank" />
<meta name="keywords" content="NBA,nba,NBA常规赛,nba常规赛,火箭,0405赛季NBA常规赛,姚明,NBA记录,比分直播,NBA积分榜,NBA赛程">
<meta name="description"
content="NBA","NBA火热赛事","NBA图片","火箭-姚明","NBA热点新闻","NBA每日综述","NBA辩论","NBA评论","NBA排行榜","NBA技
术统计","王治郅-热队","NBA论坛">
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
<link href="http://sports. rel="stylesheet" type="text/css" />
<link href="http://cimg2. rel="stylesheet" type="text/css" />
<link href="http://sports. rel="stylesheet" type="text/css" /></head>
<div class="col3">
<script language="javascript">
var nn;
nn=1;
setTimeout('change_img12()',6000);
function change_img12()
{
if(nn>4) nn=1
setTimeout('setFocus12('+nn+')',6000);
nn++;
tt=setTimeout('change_img12()',6000);
}
function setFocus12(i)
{
selectLayer12(i);
}
function selectLayer12(num)
{
for(var id = 1;id<=4;id++)
{
var ss="focusPic"+id;
if(id==num)
document.getElementById(ss).style.display="block";
else
document.getElementById(ss).style.display="none";
}
}
</script>
<div class="focusPic" id="focusPic1" style="display:block">
<div class="pic">
<a href="#"><img src="#" alt="AA" width="280" height="390" border="0" /></a>
</div>
<div class="text">
<h2><a href="#" class="cWhite">AA</a></h2>
<span><img src="#" alt="BB" width="42" height="25" border="0" /></span>
</div>
<div class="textNum">
<div class="num bg1">
<ul>
<li>1</li><li><a href="javascript:setFocus12(2);" target="_self">2</a></li><li><a href="javascript:setFocus12(3);" target="_self">3</a></li><li><a href="javascript:setFocus12(4);" target="_self">4</a></li>
</ul>
</div>
</div>
</div>
<div class="focusPic" id="focusPic2" style="display:none">
<div class="pic">
<a href="#"><img src="#" alt="CC" width="280" height="390" border="0" /></a>
</div>
<div class="text">
<h2><a href="#" class="cWhite">CC</a></h2>
<span><img src="#" alt="BB" width="42" height="25" border="0" /></span>
</div>
<div class="textNum">
<div class="num bg2">
<ul>
<li><a href="javascript:setFocus12(1);" target="_self">1</a></li><li>2</li><li><a href="javascript:setFocus12(3);" target="_self">3</a></li><li><a href="javascript:setFocus12(4);" target="_self">4</a></li>
</ul>
</div>
</div>
</div>
<div class="focusPic" id="focusPic3" style="display:none">
<div class="pic">
<a href="#"><img src="#" alt="DD" width="280" height="390" border="0" /></a>
</div>
<div class="text">
<h2><a href="#" class="cWhite">DD</a></h2>
<span><img src="#" alt="BB" width="42" height="25" border="0" /></span>
</div>
<div class="textNum">
<div class="num bg3">
<ul>
<li><a href="javascript:setFocus12(1);" target="_self">1</a></li><li><a href="javascript:setFocus12(2);" target="_self">2</a></li><li>3</li><li><a href="javascript:setFocus12(4);" target="_self">4</a></li>
</ul>
</div>
</div>
</div>
<div class="focusPic" id="focusPic4" style="display:none">
<div class="pic">
<a href="#"><img src="#" alt="EE" width="280" height="390" border="0" /></a>
</div>
<div class="text">
<h2><a href="#" class="cWhite">FF</a></h2>
<span><img src="#" alt="BB" width="42" height="25" border="0" /></span>
</div>
<div class="textNum">
<div class="num bg4">
<ul>
<li><a href="javascript:setFocus12(1);" target="_self">1</a></li><li><a href="javascript:setFocus12(2);" target="_self">2</a></li><li><a href="javascript:setFocus12(3);" target="_self">3</a></li><li>4</li>
</ul>
</div>
</div>
</div>
</body>
</html>