You are here: irt.org | FAQ | JavaScript | History | Q902 [ previous next ]
JavaScript 1.2 allows a partial string to be specified as a parameter in the history objects back method, which will go back to the last url loaded which contains the partial string:
<script language="JavaScript1.2"><!-- history.back('irt.org'); //--></script>
Which would go back to the last entry in the history object that contains irt.org.
You can provide your own back button:
<script language="JavaScript"><!-- function myBack() { history.go(-1); } //--></script> <script language="JavaScript1.2"><!-- function myBack() { history.back('irt.org'); } //--></script> <form> <input type="button" value="back" onClick="myBack()"> </form>
Apparently, none of this works in Internet Explorer 4.