Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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

You are here: irt.org | FAQ | JavaScript | History | Q801 [ previous next ]

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?'

©2018 Martin Webb