(function(){ var val = document.getElementById("name").innerHTML; document.getElementById("copy").innerHTML = val.substring(val.indexOf(" ") + 1) })()