I want to make a Web client as shown in the picture. Click the navigation on the left to jump to the page on the right without refreshing.
That is, when the page on the right changes, the main routing address remains unchanged, such as index.html/# Page 1, please ask for guidance from the master, or provide study documents
Corresponds to the five navigations on the left, and five different contents can be written on the right. Click on the corresponding blocks on the left and right to display them, while other blocks are hidden. It's called tab switching.
To change the url, you can write "#block1", "#block2", etc. to the href attribute of the peripheral a tag of the left navigation.
The basic code is as follows:
The answers above all use tab, I don’t know if this is what the questioner wanted
Front-end (index.html):
Backend (server.php):
No restrictions on languages and frameworks? Simply talking about the way to switch content without refreshing:
tab switching can be implemented simply
css
or using js or jq.Update data and content without refreshing, Ajax implementation
Route jump,
vue
和angular
等框架都可以实现但是题主给的样例是比较常见的
tab切换
Sample, it is still recommended to use this to achieveIt is tab switching, implemented with :target pseudo-element.
http://codepen.io/hzz/pen/RVNbyz
Use routing, angular, vue, etc.