javascript手風琴效果程式碼

來源:互聯網
上載者:User
提示:您可以先修改部分代碼再運行

<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"></td> </tr> </table></td> <td width="619" height="500" valign="top"><div id="divhl01" > <div class="accordion"> <dl class="clearfix"> <dt></dt> <dd class="d1"> <p>廣東寶安人,出生於1960年,</p> <p>業內知名編劇、導演及監製。</p> <p>1980年起參加電影公司特技組工作,1983年始任編劇,1988年開始執導影片。</p> <p>主要作品有《小男人周記》、《逃學威龍》系列、《武狀元蘇乞兒》、</p> <p>《精武英雄》、《野獸刑警》、《霹靂火》、《老鼠愛上貓》等等,</p> <p>1999年曾憑《野獸刑警》一片奪得香港電影金像獎最佳編劇與最佳導演獎。</p> <p>曆任香港電影家協會會長、香港電影導演協會會長,多年連任金像獎董事局成員,</p> <p>2007年當選新一屆香港電影金像獎主席至今。</p> </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"></td> </tr> </table></td> <td width="619" height="500"><div id="divhl02" > <div class="accordion2"> <dl class="clearfix"> <dt></dt> <dd class="d1"> <p>行名“弟弟”,有多年動作指導經驗:</p> <p>80年代和徐小明到內地拍過《木棉袈裟》、《海市蜃樓》等片;</p> <p>90年代初加入香港著名武術指導班子袁家班,跟袁和平、袁祥仁等拍攝了</p> <p>《黃飛鴻》系列、《武狀元蘇乞兒》等電影;</p> <p>與林迪安有較多的合作。</p> <p>曾隨袁和平的團隊在好萊塢的《駭客帝國》、《殺死比爾》等電影中擔當重要武行。</p> <p>近年作品有《中華英雄》、《臥虎藏龍》、《功夫》、《霍元甲》、</p> <p>《夜宴》、《投名狀》、《錦衣衛》、《趙氏孤兒》等等。</p> </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"></td> </tr> </table></td> <td width="619" height="500"><div id="divhl03"> <div class="accordion3"> <dl class="clearfix"> <dt></dt> <dd class="d1"> <p>行名BoBo姐,香港資深造型設計師。</p> <p>多次獲得香港電影金像獎和台灣電影金馬獎,曾為張國榮、葉童、張敏、張學友等明星造型。</p> <p>《新白娘子傳奇》中白蛇青蛇造型,和電影《青蛇》中張曼玉造型都是其巔峰之作。</p> <p>此外,BoBo姐也是將戲劇中的“銅錢頭”元素用於商業電影造型的第一人。</p> <p>電影作品有:《笑傲江湖》(徐克),《畫皮》(陳嘉上),</p> <p>《越光寶盒》(劉鎮偉),《新倩女幽魂》(葉偉信),《畫壁》(陳嘉上);</p> <p>電視劇作品有:《倚天屠龍記》、《新龍門客棧》、</p> <p>《武林外史》、《少年包青天2》、《少年張三丰》、《蕭十一郎》、</p> <p>《至尊紅顏》、《鐵齒銅牙紀曉嵐》等等。</p> </dd> </dl> </div> </div></td> <td class="pdboder"><table width="20" border="0" cellpadding="0" cellspacing="0"> <tr> <td></td> </tr> </table></td> <td class="pdboder"><table width="20" border="0" cellpadding="0" cellspacing="0"> <tr> <td></td> </tr> </table></td> </tr> </table> <script language="javascript" src="js/scrollad.js"></script></td> </tr> </table></div> </td> </tr></table>
提示:您可以先修改部分代碼再運行

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.