So I'm newbie in web development and I wanted to create paragraph that could change its textContent with textarea. I mean: if I would write 'Hello World!' in textarea, I wanted the content of paragraph change into text, that is written in the textbox. with JavaScript of course. but I have no idea how to do it. I had some tries but they all failed. Here is my HTML, I need JavaScript Tutor...
<p class="test-text"></p>
<textarea class="tarea" name="textarea" cols="30" rows="10"></textarea>
and variables that I created:
var paragraph = document.querySelector('.test-text');
var tarea = document.querySelector('.tarea');
Can u guys help me :D