Home > Web Front-end > JS Tutorial > body text

JavaScript introductory tutorial (7) History historical object_basic knowledge

WBOY
Release: 2016-05-16 18:56:23
Original
1143 people have browsed it

Due to security requirements, this object has received many restrictions and now only the following properties and methods remain. The History object has the length attribute, which lists the number of history items. The history that JavaScript can manage is limited to the range that can be reached using the browser's "forward" and "back" keys. This attribute returns the sum of the addresses contained under the "forward" and "backward" buttons.
History object has the following methods
back() to go back, which is equivalent to pressing the "Back" key.
forward() forward, which is equivalent to pressing the "forward" key.
go() Usage: history.go(x); Go to a specified address within the history range. If x < 0, go back x addresses, if x > 0, go forward x addresses, and if x == 0, refresh the now open web page. history.go(0) is equivalent to location.reload().

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!