<!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=gb2312" /> 
<title>标题切换 </title> 
<style type="text/css"> 
    body{margin:0px; font-family:"宋体";} 
ul{margin:0px; list-style-type:none; padding-left:0px;} 
#t_u_1{ font-size:14px; font-weight:bold; cursor:pointer;} 
.t_li_on{width:100px; height:25px; background-color:#FF0000; text-align:center; line-height:25px; float:left; color:#ffffff;} 
.t_li_off{width:100px; height:25px; background-color:#cccccc; text-align:center; line-height:25px; float:left;} 
</style> 
<script language="javascript"> 
var tid =null;
var i=1;
function startChange(tNum) 

if(i==1)

    for(var j=1;j <=tNum;j++) 

    document.getElementById("t_"+j).className="t_li_off"; 

document.getElementById("t_"+i).className="t_li_on"; 

else if(i==2) 

    for(var j=1;j <=tNum;j++) 

    document.getElementById("t_"+j).className="t_li_off"; 

document.getElementById("t_"+i).className="t_li_on"; 

else if(i==3) 

    for(var j=1;j <=tNum;j++) 

    document.getElementById("t_"+j).className="t_li_off"; 

document.getElementById("t_"+i).className="t_li_on"; 

if(i==tNum) 

    i=1;

else

    i++; 


function overChange(s,snum) 
{
if(tid != null) clearInterval(tid);
for(var i=1;i<snum+1;i++) 
    { 
        document.getElementById("t_"+i).className="t_li_off"; 
    } 
    document.getElementById("t_"+s).className="t_li_on"; 

function initChange() 
{
if(tid != null) clearInterval(tid);
    tid = setInterval("startChange(3)",100);

var i=1; 
initChange(); 
</script> 
</head> 
<body> 
<div style="width:300px; height:225px; background-color:#CCCCFF;"> 
     <div style="width:300px; height:25px; background-color:#cccccc;"> 
     <ul id="t_u_1"> 
     <li class="t_li_on" id="t_1" onmouseover="overChange(1,3)" onmouseout="initChange();">ASP文章 </li> 
<li class="t_li_off" id="t_2" onmouseover="overChange(2,3)" onmouseout="initChange();">PHP文章 </li> 
<li class="t_li_off" id="t_3" onmouseover="overChange(3,3)" onmouseout="initChange();">JSP文章 </li> 
</ul> 
</div> 
</div> 
</body> 
</html>

解决方案 »

  1.   

    你这个效果 很多 地方都带了 直接截取 别人的就ok了MSN QQ 迅雷 每次启动 会自己打开个 迷你浏览器
    你找到 那个页面的地址 打开分析就ok了代码我就不写了 
      

  2.   

    给你贴个 迅雷 页面地址
    http://biz5c.sandai.net/desktopnews/index2.htm
      

  3.   


    <!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=gb2312" /> 
    <title>标题切换 </title> 
    <style type="text/css"> 
        body{margin:0px; font-family:"宋体";} 
    ul{margin:0px; list-style-type:none; padding-left:0px;} 
    #t_u_1{ font-size:14px; font-weight:bold; cursor:pointer;} 
    .t_li_on{width:100px; height:25px; background-color:#FF0000; text-align:center; line-height:25px; float:left; color:#ffffff;} 
    .t_li_off{width:100px; height:25px; background-color:#cccccc; text-align:center; line-height:25px; float:left;} 
    </style> 
    <script language="javascript"> 
    var tid =null;
    var i=1;
    function startChange(tNum) 

    for(var j=1;j <=tNum;j++) 
            { 
                if(i==j){
    document.getElementById("t_"+j).className="t_li_on";
    }
    else
    document.getElementById("t_"+j).className="t_li_off"; 
            } 
    i++;
    if(i>3) i=1;

    function overChange(s,snum) 
    {
        if(tid != null) clearInterval(tid);
        for(var i=1;i<snum+1;i++) 
        { 
            document.getElementById("t_"+i).className="t_li_off"; 
        } 
        document.getElementById("t_"+s).className="t_li_on"; 

    function initChange() 
    {
        if(tid != null) clearInterval(tid);
        tid = setInterval("startChange(3)",100);

    initChange(); 
    </script> 
    </head> 
    <body> 
    <div style="width:300px; height:225px; background-color:#CCCCFF;"> 
         <div style="width:300px; height:25px; background-color:#cccccc;"> 
         <ul id="t_u_1"> 
         <li class="t_li_on" id="t_1" onmouseover="overChange(1,3)" onmouseout="initChange();">ASP文章 </li> 
    <li class="t_li_off" id="t_2" onmouseover="overChange(2,3)" onmouseout="initChange();">PHP文章 </li> 
    <li class="t_li_off" id="t_3" onmouseover="overChange(3,3)" onmouseout="initChange();">JSP文章 </li> 
    </ul> 
    </div> 
    </div> 
    </body> 
    </html>
      

  4.   

    刚试了试 迅雷的 好像在ff下测试 有问题 不过QQ的 通过
    QQ的
    http://minisite.qq.com/all/allinone.shtml
      

  5.   

    if(i>3) i=1;
    改为 
    if(i>tNum) i=1;
      

  6.   

    谢了,这么多好心人。我再看下hookee和siyee。
    如果让我选择的话,我觉得还是siyee提炼之后的好。谢谢。