The following small series will bring you a common Tab switching effect (recommended) in js ). I think this is quite good. Now I will share it with you and give you a reference. Let's take a look at the small series. I wish you a pleasant game. The following small series will provide you with a common Tab switching effect (recommended) in js ). I think this is quite good. Now I will share it with you and give you a reference. Let's take a look at the small Editor and wish you a pleasant game.
As follows:
Tab
Handsome girl, pet, film, hero league, music
-
Jason Shi tanson is arrogant and cool.
Jason Shi tanson is arrogant and cool.
Tom Cruise
Tom Cruise
Qifu low-key luxury with Connotation
Qifu low-key luxury with Connotation
-
Female and female
Female and female
Female toot mouth scissors
Female toot mouth scissors
Beautiful, stylish, small, fresh
Beautiful, stylish, small, fresh
-
666 pets each
666 pets each
666 pets each
666 pets each
666 pets each
666 pets each
-
Classic in the Harry Potter series
Three dumbys and a click on the left.
Transformer series
The little Lori in qianxun's dream is so fresh
Alimama, my alimama
A ganzheng believes that a Gump is still the argan.
-
He's daughter-in-law
The girl of darkness, Lori.
I'm the best player in Explorer games
Individual and all-around
Timoti has millions of deaths and millions of deaths every day ..
Don't zoom in on me
- To be developed...
Script var title = document. getElementById ('title'); var content = document. getElementById ('content'); var spans = title. getElementsByTagName ('span '); var lis = content. getElementsByTagName ('lil'); for (var I = 0; I <spans. length; I ++) {spans [I]. index = I; spans [I]. onclick = function () {for (var j = 0; j <spans. length; j ++) {spans [j]. className = ''; lis [j]. className = '';} this. className = 'select'; lis [this. index]. className = 'show';} script
The key of this Code is the last two for traversal and this pointer. The first for traversal is to add click events for each span button, the second for traversal is to determine which button is currently clicked, and the corresponding content is well controlled and hidden.
The Tab switching effect (recommended) commonly used in this js article is all the content shared by Alibaba Cloud xiaobian. I hope you can give us a reference and support PHP Chinese network.
For more articles about the commonly used Tab switching effect in js, refer to PHP Chinese network!