One 、 Example is given to illustrate :
$('#btnOne').click(function () {
var stateObject = { id: 1 };
var title = " Local home page ";
var newUrl = '/index.html';
// Change the address in the address bar
/*
* Instructions ,pushState Address cached in , Must be an address in the current domain
*/
history.pushState(stateObject, title, newUrl);
});
$('#btnTwo').click(function () {
// Get operation history
console.info(history.length);
});
window.addEventListener('popstate', function (event) {
console.info(event);
console.info(event.state);
/*
* event.state.id Get instructions , Opening the page for the first time didn't id, It throws an exception
*/
console.info(event.state.id);
});
test result :IE10 And above browser support ,Google,FF Support
HTML5 History One :http://www.cnblogs.com/tianma3798/p/5584541.html
HTML5 History object ,Javascript Modify the address bar without refreshing the page ( Two ) More articles about
- HTML5 History object ,Javascript Modify the address bar without refreshing the page
One .History object History Object contains user ( In the browser window ) Visited URL. History The object is window Part of the object , It can be done by window.history Property to access it . ...
- HTML5 Modify browser url Without refreshing the page
Well , The reason is an article on Uncle sunspot's microblog @ Information , Found the realization of this , Look around google I don't seem to have mentioned this in the Chinese information of , Just publish it . The detailed effect is similar to using Firefox4+/Chrome 5+/Saf ...
- mui From the list to the details , Back again , The list page is the same as before , Without refreshing the page
mui From the list to the details , Back again , The list page is the same as before , Without refreshing the page
- PHP + JavaScript + Ajax Achieve no refresh page loading effect
Data source factory Json generation 1 Json generation 2 Data movers Data processors Conversion type Processing display Result display Initial page After clicking the button summary The idea of today's experiment is to achieve a no refresh page loading effect . The specific idea is ...
- javascript modify div Size occlusion page rendering problem
The page introduces other js file , The browser window changes , The page doesn't follow the rendering problem . Finally, the reason is that js The last line of the method is missing : "right": RightBox_w. window.onresiz ...
- Html5 Use history object history.pushState() and history.replaceState() Method to add and modify browsing history
Make a note of yourself according to the online reference : Refer to the website :http://javascript.ruanyifeng.com/bom/history.html history.pushState() HTML5 by histor ...
- Aunt Lin's JavaScript Advanced knowledge ( 3、 ... and ):HTML5 History API
HTML5 Added in History API, It is used to manage a browser route jump url Stack .History yes window Part of the object , It's also an object , So it's called BOM( similar DOM,Browser Object ...
- BOM And history object
In front of the word history Object holds the user's history of surfing the Internet , From the moment the window is opened . Because of security considerations , Developers can't get the user browser's URL, But with a list of pages that users have visited , Can be in do not know actual URL After the implementation of ...
- BOM And history object ( turn )
In front of the word history Object holds the user's history of surfing the Internet , From the moment the window is opened . Because of security considerations , Developers can't get the user browser's URL, But with a list of pages that users have visited , Can be in do not know actual URL After the implementation of ...
Random recommendation
- turn : Unable to issue session state request to session state server. Please . Make sure ASP.NET State Service (ASP.NET State Service ) Started
It's good to see an article today , Collection and reprint . Original address :http://blog.csdn.net/sntyy/article/details/2090347 The copyright is owned by the original author Unable to issue session status to session state server ...
- John the Ripper
John the RipperJohn the Ripper( abbreviation John) It's a famous password cracking tool . It's mainly for all kinds of Hash Encrypted ciphertext . It is different from Rainbow Table The way . It uses real-time computing and encryption ...
- ROS Use your own and usb The camera takes the image
The device number of the camera on the laptop is usually /dev/video0 First step : install Webcam drive $ sudo apt-get install git-core $ cd ~/catkin_ws/src $ g ...
- [ios]app Background operation
Reference resources :http://www.douban.com/note/375127736/ 1 Use open source MMPDeepSleepPreventer Add files to the project , Including audio files . Singletons can be added to the source file , To make convenient for ...
- [Locked] Largest BST Subtree
Largest BST Subtree Given a binary tree, find the largest subtree which is a Binary Search Tree (BST ...
- use ACE Login facilities ( One )HelloWorld
(1) Start using logging facilities Use the log facility , Always include header files : #include "ace/Log_Msg.h" ACE The log Hello World #ifdef _DEBUG #pra ...
- Appium 1.6.4 Environment building process (Java, Android+IOS, Windows+Mac)
Appium1.6.4 It's been a while , Let's quickly show you how to build , Posted a download link 1 Based on the environment : Windows + Mac: Java JDK 1.8+ ( Environment variables need to be configured ),Appium1.6.4 Of ...
- phpstorm Modify the default comment when creating a file
It's been revised before , After a while, I forgot , Write a note . It's easy to find next time Tool version Tool settings ,File>>Settings... as follows
- WIN8.1 Next Prolific USB-to-Serial Comm Port Drive yellow exclamation mark problem
The article solves the source :http://blog.csdn.net/gsj0791/article/details/17664861 Doing it fpga Oral uart In the loop test , Because what's on the development board is usb turn uart, So we need ...
- last individual reading task 12061183 Ye luting
http://www.cnblogs.com/yltyy/p/4025426.html 1.Different people deserve different tasks; Once team ro ...