Name
History.forward( ) — visit the next URL
Availability
JavaScript 1.0
Synopsis
history.forward( )
Description
forward( )
causes the window or frame to which the
History object belongs to revisit the URL (if any) that was visited
immediately after the current one. Calling this method has the same
effect as clicking on the browser’s Forward button. It is also equivalent to:
history.go(1);
Note that if the user has not used the Back button or the Go menu to move backward through the history,
and if JavaScript has not invoked the History.back( )
or History.go( )
methods, the
forward( )
method has no effect because the
browser is already at the end of its list of URLs, and there is no
URL to go forward to.
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.