How to change the code of the current url without refreshing
Mar 26, 2018 pm 02:46 PMThis time I will show you how to change the code of the current url without refreshing, and how to change the code of the current url without refreshing. What are the precautions?The following is a practical case, let’s take a look together take a look.
window.history.back();//Back
window.history.forward();//Forward
window.history.go(-1) ;//Move to the specified recording point, currently going backwards by 1, which is equivalent to window.history.forward()
window.history.length//You can know how many recording points there are in the history
The above is just a check Attached to the data
The following is about
history.pushState and history.replaceState
history.pushState will add a history record,
history.replaceState It will be replaced rather than added, so it will be more comfortable.
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
Detailed explanation of H5’s storage method
How to use the constraint verification API in H5
postMessage implements cross-domain and cross-window messaging
The above is the detailed content of How to change the code of the current url without refreshing. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to change the starting delivery price of Meituan Takeout merchant version

How to change border color on Win7 computer

Control element visibility using jQuery

How to change the save location of win10 recording

Tesla app store debuts: revolutionary change in driving experience

How to change the default c drive to d drive in win7 How to change the default c drive to d drive in win7 Detailed introduction

New changes in PHP8: exploring its impact on change
