Hello everyone!
I have a small "problem". I'm new in Javascript. I want whatever I write in a textarea field being typed automatically in a <p> I have the script needed but
it gets delayed -1 character. Here's the script. Paste it and tell me what's wrong

<script type="text/javascript">
function writeText(txt)
{
document.getElementById("desc").innerHTML=txt;
}
</script>

<form name="form1">
<textarea cols="45" rows="5" name="comment" onkeyPress="writeText(document.form1.comment.value)"></textarea>

<p id="desc"></p>
</form>


Thanks in advance

PS: By the way... How can I make it appear some HTML code when there characters start to be typing?