欢迎来到酷云建站平台,全网营销云系统加盟中心!

海量企业网站模板 · 任您选择

美出特色,精出品质,一切为了企业更好的营销

隐藏侧栏
Beta
转载

javascript手风琴效果程序代码

       对话框和灯箱     2016-02-16     eycms     78     0    

<script>

var timeout2=99999999999;  //切换时间

var timeout3=10000; //mouse over 后切换时间

var now_content=0;

var total_content=3;

var way=1;

var start_content=Math.round(Math.random()*(total_content-1))+1; //除广告为第一显示外

function content_mouse(num){

 now_content=num;

 window.clearInterval(theTimer2);   

 for (var i=1;i<=total_content;i++){

 document.getElementById('divhl0'+i).style.display='none';

 //document.getElementById('pic'+i).style.background='url("20110913huabizc/'+i+'.jpg")';

 document.getElementById('pic'+i).style.backgroundPosition='0px 0px';

 }

 document.getElementById('divhl0'+num).style.display='block';

 //document.getElementById('pic'+num).style.background='url("20110913huabizc/'+num+'.jpg")';

 document.getElementById('pic'+num).style.backgroundPosition='-50px 0px';

 theTimer2=setTimeout('change_content()', timeout3);

}

 

function change_content(){

 

 for (var i=1;i<=total_content;i++){

 document.getElementById('divhl0'+i).style.display='none';

 }

 document.getElementById('divhl0'+now_content).style.display='block';

 if (way) now_content++;

 else now_content--;

 if(now_content>total_content) {now_content=total_content-1;way=0;}

 else if(now_content==0) {now_content=1;way=1;}

 theTimer2=setTimeout('change_content()', timeout2);

}

theTimer2=setTimeout(function(){now_content=1;change_content();}, timeout2);

</script>


<div class="director">

        <table width="619" border="0" cellpadding="0" cellspacing="0">

          <tr>

            <td>

            <table border="0" cellpadding="0" cellspacing="0">

              <tr>

              <td onclick="content_mouse(1)" valign="top" class="pdboder"><table width="20" border="0" cellpadding="0" cellspacing="0">

                    <tr>

                      <td width="50"><a href="###" class="title1" target="_self" id="pic1"></a></td>

                    </tr>

                </table></td>

                <td width="619" height="500" valign="top"><div id="divhl01" style="display:none;">

                    <div class="accordion">

                        <dl class="clearfix">

                        <dt><a href="#" target="_self"></a></dt>

                        <dd class="d1">

                          <img  src="/newstopic/20110913huabizc/author.jpg" alt="" title="" />

                            <a href="/news/zhuantipindao/2011/0921huabidirector/index.html" target="_self"><img  src="http://filesimg.111cn.net/2013/01/10/20130110032521715.jpg" alt="" title="" /></a></dd>

                    </dl>

                    </div>

                </div></td>

                <td onclick="content_mouse(2)" valign="top" class="pdboder"><table width="20" border="0" cellpadding="0" cellspacing="0">

                    <tr>

                      <td width="50"><a href="###" target="_self" class="title1" id="pic2"></a></td>

                    </tr>

                </table></td>

                <td width="619" height="500"><div id="divhl02" style="display:none;">

 

                    <div class="accordion2">

                        <dl class="clearfix">

                        <dt><a href="#" target="_self"></a></dt>

                        <dd class="d1">

                          <img  src="/newstopic/20110913huabizc/author2.jpg" alt="" title="" />

      

                            <a href="/news/zhuantipindao/2011/1011guxuanzhao/index.html" target="_self"><img  src="/newstopic/20110913huabizc/exclusive2.jpg" alt="" title="" /></a>        

                        </dd>

                    </dl>

                    </div>

 

                </div></td>

 

 

                <td onclick="content_mouse(3)" valign="top" class="pdboder"><table width="20" border="0" cellpadding="0" cellspacing="0">

                    <tr>

                      <td width="50"><a href="###" target="_self" class="title1" id="pic3"></a></td>

                    </tr>

                </table></td>

                <td width="619" height="500"><div id="divhl03">

 

                    <div class="accordion3">

                        <dl class="clearfix">

                        <dt><a href="#" target="_self"></a></dt>

                        <dd class="d1">

                          <img  src="/newstopic/20110913huabizc/author3.jpg" alt="" title="" />

                  

                            <a href="/news/zhuantipindao/2011/1019huabibobo/index.html" target="_self"><img  src="http://filesimg.111cn.net/2013/01/10/20130110032527520.jpg" alt="" title="" /></a>        

                        </dd>

                    </dl>

                    </div>

 

                </div></td>

 

 

                <td  class="pdboder"><table width="20" border="0" cellpadding="0" cellspacing="0">

                    <tr>

                      <td><a href="#" target="_self" class="title1"><img  src="/20110913huabizc/4.jpg" /></a></td>

                    </tr>

                </table></td>

 

                <td  class="pdboder"><table width="20" border="0" cellpadding="0" cellspacing="0">

                    <tr>

                      <td><a href="#" target="_self" class="title1"><img  src="/newstopic/20110913huabizc/5.jpg" /></a></td>

                    </tr>

                </table></td>

              </tr>

            </table>

            <script language="javascript" src="js/scrollad.js"></script></td>

          </tr>

        </table>

</div> </td>

 </tr>

</table>


--结束END--

本文链接: http://www.83703228.cn/resources/dialog/1149.html (转载时请注明来源链接)

 
本文标签: 全部

下班PC阅读不方便?

手机也可以随时学习开发

微信关注公众号“酷云”
"酷云平台前端开发教学"
每日干货技术分享
 

×

成为 酷云平台 代理商!

关注

微信
关注

微信扫一扫
获取最新优惠信息

酷云平台公众号

客服

联系
客服

很高兴为您服务
尊敬的用户,欢迎您咨询,我们为新用户准备了优惠好礼。 咨询客服

联系客服:

在线QQ: 3206174

客服电话: 0516-83703228

售前咨询 售后服务
在线交谈 智能小云

工作时间:

周一至周五: 09:00 - 17:00

WAP

手机
访问

移动端访问
手机上也能选模板

酷云平台手机端