Is there a JavaScript solution to generating a “table of contents” for a page?

后端 未结 12 1713
广开言路
广开言路 2020-12-12 17:21

I have headers in

through
tags. Is there a way that I can use JavaScript to generate a table of contents for the contents tha

12条回答
  •  离开以前
    2020-12-12 17:56

    JQuery comes to mind as a fast and easy solution. A quick google search for jquery table of contents yields two promising results:

    • jqTOC
    • Article on how to do this manually

提交回复
热议问题