Home > Web Front-end > H5 Tutorial > Html5 method to modify browser URL without refreshing_html5 tutorial skills

Html5 method to modify browser URL without refreshing_html5 tutorial skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 15:48:34
Original
1829 people have browsed it

Ajax partial refresh can modify the browser address through the new features of HTML5.

window.history represents the history record of the window object

window.history.pushState(object, title, new_url) -- Add a new history record point in window.history

window.history.replaceState(object, title, new_url) -- Replace the history record point of the current page in window.history

object - You can expand the desired object

title - Currently All browsers do not support

new_url. The browser will not check whether the url exists. It only changes the url. The url must be in the same domain and cannot cross domains.

eg: original url: www.test.com

window.history.pushState({time: 'test'}, ' ', 'www.test_test.com')

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
html5 validation for symfony 2.1
From 1970-01-01 08:00:00
0
0
0
The difference between HTML and HTML5
From 1970-01-01 08:00:00
0
0
0
html5 show hide
From 1970-01-01 08:00:00
0
0
0
Can PDF files run HTML5 and Javascript?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template