js tab切換處理

2022-08-28 16:51:16 字數 1919 閱讀 2182

>js-tab切換處理

title

>

6<

style

>

7.box

12/*

讓底部所有的div隱藏

*/13

.bottom div

19/*

讓底部class為show的顯示出來

*/20

.bottom .show

23.tab_select

26style

>

27<

script

>

28window.onload

=function

() 44

//設定當前button為選中

45this

.classname ="

tab_select";

46//

顯示出對應的div

47divs[

this

.index].classname ="

show";

48console.log(

this

.index);49}

50}5152}53

script

>

54head

>

55<

body

>

56<

div

class

="box"

>

57<

div

class

="top"

>

58<

button

class

="tab_select"

>第乙個

button

>

59<

button

>第二個

button

>

60<

button

>第三個

button

>

61<

button

>第四個

button

>

62<

button

>第五個

button

>

63div

>

64<

div

class

="bottom"

id="divs"

>

65<

div

class

="show"

>1號盒子

div>

66<

div>2號盒子

div>

67<

div>3號盒子

div>

68<

div>4號盒子

div>

69<

div>5號盒子

div>

70div

>

71div

>

72body

>

73<

script

>

7475

script

>

76html

>

切換 ip 批處理

自動獲取 設定固定值 echo off rem eth 設定網絡卡名稱,如 本地連線 set eth 無線網路連線 rem ip 設定ip位址 set ip 192.168.1.243 rem gw 設定閘道器 set gw 192.168.1.1 rem netmasks 設定子網掩碼 set n...

ARM處理器模式切換

參考 arm體系的cpu有以下7種工作模式 1 使用者模式 usr 正常的程式執行狀態 2 快速中斷模式 fiq 3 中斷模式 irq 4 管理模式 svc 作業系統使用的保護模式 5 系統模式 sys 執行具有特權的作業系統任務 6 資料訪問終止模式 abt 資料或指令預取終止時進入該模式 7 未...

selenium切換到alert彈窗處理

這裡提前準備了一段簡單的alert頁面 快點我 下面 切換處理alert彈窗 from selenium import webdriver from selenium.webdriver.support.wait import webdriverwait from selenium.webdrive...