<input id="inp"> <a href="" onclick = "inp.value = sp.innerHTML; return false;">Paste</a><br> <span id="sp">content</span>