It could be done with jQuery, but I think you would lose the
attribute of the link. With buttons, you can make them act like a link by setting
but I don't think you can set a rel attribute on a button. So if you need the nofollow then I wouldn't convert a link to a button. If you don't care about nofollow, then use jQuery to find the link, record the parent element and the href attribute, remove the link, create a button tag and set onclick like above using the recorded href attribute, set the html of the parent with the button tag... and you're done! :-)
If you have no understanding of what I just wrote, contact me and I can set you up for a small fee.