I am a newbie. Here is my code:
It should be:
document.getElementById("comment_content").value = document.getElementById("username").innerHTML
Without the .innerHTML, it will try to copy in the actual element, not its content.
.innerHTML