2 Answers

var inputValue;
inputValue = document.getElementById('linkName').value;
//you cannot select the a tag like this you'll need to select it by his id
document.getElementById('link').innerHTML = inputValue