I am trying to implement a go back button using javascript. The code below works fine for ie and firefox. It doesnt work for safari though. Any ideas to fix the problem?
<A href="javasc开发者_开发技巧ript:history.back()"><IMG border=0 src="imageurl1"></A>`
I tried history.go(-1) as well.
Thanks,
You can try making a function with preventDefault like this:
function goBackHistory(){
history.go(-1);
event.preventDefault();
}
and then call function from html
<a href="javascript:goBackHistory()"><IMG border=0 src="imageurl1"></a>
精彩评论