How can I make my navi-bar the same across my html?

后端 未结 9 798
长发绾君心
长发绾君心 2020-12-05 13:26

With each new page I have to update the navigation panel. Which means I go from page to page copying and pasting my navigation bar. The more pages I add the harder it gets.

9条回答
  •  长情又很酷
    2020-12-05 13:44

    You can use server side scripting languages like php or ruby. Or you can create some say menu.json file and create menu from that in javascript.

    1. With serverside you should setup server or you can use XAMPP for fast setup.

    2. Create header.html with all your menu links

    3. Inlude menu file by using line (all files where you use it should be with .php extension or you can edit php config file for .html extension)

提交回复
热议问题