多層層顯示js
來源:易賢網 閱讀:797 次 日期:2016-06-14 09:58:09
溫馨提示:易賢網小編為您整理了“多層層顯示js”,方便廣大網友查閱!

多層層顯示js

多層層顯示js<!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>多層層顯示js</title>

</head>

<script language=javascript>

function showdiv(i)

{

document.getelementbyid(tag1).style.display=none;

document.getelementbyid(tag2).style.display=none;

document.getelementbyid(tag3).style.display=none;

document.getelementbyid(tag4).style.display=none;

document.getelementbyid(tag+i).style.display=;

}function showdiv2(i,allnum)

{

for(temp=1;temp<allnum+1;temp++)

{

if (temp==i){document.getelementbyid(tag+temp).style.display=;}else{document.getelementbyid(tag+temp).style.display=none;}

}

}

</script>

<body>

<a href=# onmouseover=showdiv(1);>1</a>

<a href=# onmouseover=showdiv(2);>2</a>

<a href=# onmouseover=showdiv(3);>3</a>

<a href=# onmouseover=showdiv(4);>4</a>

<div id=tag1 >測試1</div>

<div id=tag2 style=display:none;>測試2</div>

<div id=tag3 style=display:none;>測試3</div>

<div id=tag4 style=display:none;>測試4</div>

<br />

<a href=# onmouseover=showdiv2(1,4);>1</a>

<a href=# onmouseover=showdiv2(2,4);>2</a>

<a href=# onmouseover=showdiv2(3,4);>3</a>

<a href=# onmouseover=showdiv2(4,4);>4</a>

</body>

</html>

更多信息請查看腳本欄目
易賢網手機網站地址:多層層顯示js

2025國考·省考課程試聽報名

  • 報班類型
  • 姓名
  • 手機號
  • 驗證碼
關于我們 | 聯系我們 | 人才招聘 | 網站聲明 | 網站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
聯系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關注公眾號:hfpxwx
咨詢QQ:1093837350(9:00—18:00)版權所有:易賢網