Sunday, December 9, 2007

History- functions: Creating 'back' and 'forward' with JavaScript

History- functions: Creating 'back' and 'forward' with JavaScript

Now we're looking at a script which lets you navigate through different documents. What I'm talking about is the back() and forward()- function. If you have a back- link on your page this isn't the same as the back- button in the Netscape- Navigator. For example I have got some back- links which work like normal links but I know that the user probably comes from that certain page I'm linking to. The back- button provided by the Netscape Navigator goes one step back in your history list. You can do this with JavaScript as well. Just take this link in order to get back again! The script I used here is shown below:

You could also write history.go(-1) and history.go(1).

Last changed: 11.May'96

©1996 by Stefan Koch

No comments: