/    Sign up×
Community /Pin to ProfileBookmark

Can I Have a Link Function Like a Back Button?

Is it possible to have a link function like a back button? That way, when they click the link, it’ll take them back to the page they just came from?

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@IncaWarriorFeb 19.2005 — if you use javascript:

<a href="javascript:history.back()">< Back</a>
Copy linkTweet thisAlerts:
@duderdude2authorFeb 19.2005 — Thanks for that. Will that work for everyone?

Can't people disable javascript though? My only concern would be that it may not work for some people. What would happen if they clicked on the link?

In other words, is it worth it to use it?

Thanks!
Copy linkTweet thisAlerts:
@the_treeFeb 20.2005 — 10% of internet users have javascript disabled, but you can make it so that only the 90% wiht javascript see it, that way no-one gets confused.
[CODE]<script type="text/javascript">
<!--
document.write('<a href="#" onlcick="history.back();">Return to whence ye came!</a>');
//-->
</script>[/CODE]
×

Success!

Help @duderdude2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...