<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="http://img.17k.com/js/jquery-1.2.6.js">

</head>

<body>
<div id="box1">
<div id="box1-1">
<div id="topic">
<div id="topicImgbox"><a href="#"><img src="http://www.cnblogs.com/xx.gif" /></a></div>
<h3 id="topicTitle"><a href="#">标题</a></h3>
<div id="topicImg">
<span><img src="http://www.cnblogs.com/xx.gif" /></span>
<span><img src="http://www.cnblogs.com/xx.gif" /></span>
<span><img src="http://www.cnblogs.com/xx.gif" /></span>
<span><img src="http://www.cnblogs.com/xx.gif" /></span>
</div>
<p id="topicTxt">说明文字…</p>

<script type="text/javascript" language="javascript">
var topicA=       
["http://changxiao.17k.com/book/34297.html%22,%22http://nvxing.17k.com/book/34380.html%22,%22http://dushi.17k.com/book/30290.html%22,%22http://yy.17k.com/book/35039.html"];       
var topicImg=       
["http://img.17k.com/channel/changxiao/34297.jpg%22,%22http://img.17k.com/channel/nvxing/dwyy.jpg%22,%22http://img.17k.com/channel/dushi/30290b.jpg%22,%22http://img.17k.com/channel/xuanhuan/tianjijue.jpg"];     
var topicTitle=["挂职","帝王游戏","激荡人生","架空谍战:火力"];       
var topicTxt=["两个处级干部下放挂职,一个到了富地左右逢源,一个到了穷山孤军奋斗。两段诡异的人生。","小美女穿到青楼,要学的不是卖艳,竟是如何在皇权势力中寻求中庸的求生之道!","一个神秘的梦境,五个绝世的美女。一场大都市下孕育的金融情色风暴……","他叫颜辉,喜欢偷窥。别人用眼,他靠梦魇。且看颜辉如何装斯文之人,行打闷棍之事!"];

$("#topicImgbox").html("<a href="+topicA[0]+" target='_blank'><img src="+topicImg[0]+" /></a>");
$("#topicTitle").html("<a href="+topicA[0]+" target='_blank'>"+topicTitle[0]+"</a>");
var topicBt=$("#topicImg img");
$("#topicImg span").eq(0).addClass("span2");
topicBt.eq(0).click(function(){setTopic(0)});
topicBt.eq(1).click(function(){setTopic(1)});
topicBt.eq(2).click(function(){setTopic(2)});
topicBt.eq(3).click(function(){setTopic(3)});
for(var i=0;i<topicBt.length;i++){
 topicBt[i].src=topicImg[i];
}
$("#topicTxt").html("<a href="+topicA[0]+" target='_blank'>"+topicTxt[0]+"</a>");

function setTopic(id){
 $("#topicImgbox").html("<a href="+topicA[id]+" target='_blank'><img src="+topicImg[id]+" /></a>");
 $("#topicTxt").html("<a href="+topicA[id]+" target='_blank'>"+topicTxt[id]+"</a>");
 $("#topicTitle").html("<a href="+topicA[id]+" target='_blank'>"+topicTitle[id]+"</a>");
 $("#topicImg .span2").removeClass("span2");
 $("#topicImg span").eq(id).addClass("span2")
}

var id=0;
function setTopicAuto(){
 if(id==4)id=0;
 setTopic(id);
 id++;
}

var j=setInterval(setTopicAuto,1000);
$("#topic").mouseover(function(){clearInterval(j)});
$("#topic").mouseout(function(){j=setInterval(setTopicAuto,4000)});
</script>
</div>
</div>
</div>
</body>
</html>

 posted on 2008-09-16 13:14  刘卿  阅读(559)  评论(0编辑  收藏  举报