<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3c.org/tr/1999/rec-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>腾讯博客幻灯片效果js代码</title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<link href="css教程/163css.css" type=text/css rel=stylesheet>
<meta content="mshtml 6.00.6000.17080" name=generator>
</head>
<body>
<div id=focus>
<div id=focuspic onmouseo教程ver=clearauto() onmouseout=setauto()>
<div id=fpic>
<div class=dis><a href="http://www.111cn.net"><img src="images/39528892.jpg"></a></div>
<div class=undis><a href="http://www.111cn.net"><img src="images/39532120.jpg" ></a></div>
<div class=undis><a href="http://www.111cn.net"><img src="images/39526937.jpg" ></a></div>
<div class=undis><a href="http://www.111cn.net"><img src="images/39452873.jpg"></a></div>
</div>
<div id=ftxt>
<div class=bd id=ftxtlingks>
<ul class=dis>
<li>
<h1><a href="http://www.111cn.net">唐雯:拉斯维加斯争美誉</a></h1>
<li>距离环球小姐总决赛还有最后一天了,我们"唐雯拉拉队"也越来越紧张… <a href="http://www.111cn.net">[详细]</a> </li></ul>
<ul class=undis>
<li>
<h1><a href="http://www.111cn.net">赵柯:做个模范环保达人</a></h1>
<li>不知道什么时候开始,包包里开始带上了便携筷子,属于自己的水杯…… <a href="http://www.111cn.net">[详细]</a> </li></ul>
<ul class=undis>
<li>
<h1><a href="http://www.111cn.net">清纯mm想跟谁去旅行</a></h1>
<li>不用在乎目的地,不用在乎沿途的风景,只要我们能够在一起……<a href="http://www.111cn.net">[详细]</a>
</li>
</ul>
<ul class=undis>
<li>
<h1><a href="http://www.111cn.net">飘在南京的佤族打工仔</a></h1>
<li>他们靠得就是按劳取酬,每月都能按时取到工资,他们也心满意足了…… <a href="http://www.111cn.net">[详细]</a> </li>
</ul>
</div>
<div class=ft>
<div class=more>
<a href="http://www.111cn.net"><img height=19 src="images/pic_more.gif" width=85></a>
</div>
<div id=fnums>
<div class=on onclick=mea(0)>1</div>
<div onclick=mea(1)>2</div>
<div onclick=mea(2)>3</div>
<div onclick=mea(3)>4</div>
</div>
</div>
</div>
</div>
</div><script>
var n=0;
var showstab = document.getelementbyid("fnums");
var m=showstab.getelementsbytagname("div").length;
function mea(value){
n=value;
setbg(value);
plays(value);
cons(value);
}
function setbg(value){
for(var i=0;i<m;i++)
if(value==i){
showstab.getelementsbytagname("div")[i].classname='on';
}
else{
showstab.getelementsbytagname("div")[i].classname='';
}
}
function plays(value){
try
{
with (fpic){
filters[0].apply();
for(i=0;i<m;i++)i==value?children[i].classname="dis":children[i].classname="undis";
filters[0].play();
}
}
catch(e)
{
var d = document.getelementbyid("fpic").getelementsbytagname("div");
for(i=0;i<m;i++)i==value?d[i].classname="dis":d[i].classname="undis";
}
}
function cons(value){
try
{
with (ftxtlingks){for(i=0;i<m;i++)i==value?children[i].classname="dis":children[i].classname="undis";
}
}
catch(e)
{
var d = document.getelementbyid("ftxtlingks").getelementsbytagname("ul");
for(i=0;i<m;i++)i==value?d[i].classname="dis":d[i].classname="undis";
}
}function clearauto(){clearinterval(autostart)}
function setauto(){autostart=setinterval("auto(n)", 3000)}
function auto(){
n++;
if(n>=m)n=0;
mea(n);
}
function sub(){
n--;
if(n<0)n=m-1;
mea(n);
}
setauto();function tab(o,o2,n,o1c,o2c){
var m_n = document.getelementbyid(o).getelementsbytagname(o1c);
var c_n = document.getelementbyid(o2).getelementsbytagname(o2c);
for(i=0;i<m_n.length;i++){
m_n[i].classname=i==n?"on":"";
c_n[i].classname=i==n?"dis":"undis";
}
}</script>
</body>
</html>
源码下载
http://down.111cn.net/down/code/js/jiaodiantu/2010/0908/20693.html