I would use JavaScript's localStorage()
object for this. So, on page A you'd have something like:
$(document).ready(function(){
$('a.PageALink').click(function(){
localStorage.setItem("PageAValue", $(this).text()); // Or use the data attribute, if you want the stored value to be something else, e.g. <a data-value="value to store" href="somewebsite.com">link text</a>
});
And then on Page B:
$(document).ready(function(){
$('a.PageBLink').text(localStorage.PageAValue);
});
Of course, this answer assumes that either your page already has jQuery included or that you know how to include it. If this isn't a fit for you, let us know what your limitations are in terms of dependencies, and/or scripting.