put this function behind a button not a link

I got this javascript that creates a link,however I need it to place behind button for consistency of design.

<a href="javascript: history.go(-1)">Cancel</a>
zachvaldezAsked:
Who is Participating?
 
haloexpertsexchangeCommented:
you should be able to place a button in the href like this or do an onclick on the button
<a href="javascript: history.go(-1)"><input type="button" value = "Cancel"></a>
<input type="button" value="Cancel" onClick="javascript: history.go(-1)">

Open in new window

0
 
Gurvinder Pal SinghCommented:
<input type="button" onclick="history.go(-1)" value="Cancel"/>
0
 
zachvaldezAuthor Commented:
Does it matter if my other button is server side?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Gurvinder Pal SinghCommented:
did you tried the code?
0
 
haloexpertsexchangeCommented:
it should not matter if the other button is server side.
0
 
zachvaldezAuthor Commented:
That was exactly true. I would equally share the points if I can redo the point allocation again.That was my error and I regret for it. Halo's answer was correct to.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.