Click to See Complete Forum and Search --> : back function


netman182
03-20-2003, 12:37 PM
is there a way i can program a backfunction so when i press a button it goes back in the history???

gil davis
03-20-2003, 12:41 PM
<input type="button" value="BACK" onclick="history.back()">or<input type="button" value="BACK" onclick="history.go(-1)">

netman182
03-20-2003, 12:44 PM
can i put that into a javascript???

Jona
03-20-2003, 01:34 PM
Yes.

<html><head>
<script>
function foo(){ history.go(-1); }
</script>
</head><body>
<a href="javascript:foo()">Go back</a>
</body></html>