Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q801 How can I use history.go(-1) in a text link?

irt.org | Knowledge Base | JavaScript | History | Q801 [ previous next ]

Q801 How can I use history.go(-1) in a text link?

Either:

<SCRIPT LANGUAGE="JavaScript"><!--
function back() {
    history.go(-1);
}
//--></SCRIPT>

<A HREF="javascript:back()">Back</A>

Or:

<A HREF="default.htm" onClick="history.go(-1)">Back</A>

Even easier to just use:

<a href="javascript:history.back()">Back</a>

or:

<a href="javascript:history.go(-1)">Back</a>

Feedback on 'Q801 How can I use history.go(-1) in a text link?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.