How do I make a tabbed view in HTML?

后端 未结 9 1707
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-13 05:20

When clicking on tab A, show content for tab A. Click on tab B, show content for tab B, and so on.

What\'s the most simple and compatible way of constructing a HTML snip

9条回答
  •  失恋的感觉
    2021-02-13 06:06

    Depending on your ambitions, it could simply be a matter of an unordered list and a number of

    s (tab contents). Then a simple JavaScript could - by means of getElementById() - set the display property for all the
    s: none for all except the current.

    Alternatively, you could have a look at this.

    Edit: Not the only one linking to the jQuery site, it seems :)

提交回复
热议问题