I'm trying to input text into a textarea and have it start on a new line with every insert.
Currently this is my code, so when you enter a username/text and click post it will paste this into a text area.
<script type="text/javascript">
document.getElementById("post").addEventListener('click', function () {
var username = document.getElementById('username').value;
var input = document.getElementById('input').value;
var output = document.getElementById('output');
var outputtext = username + ":" + input;
output.value += outputtext;
});
</script>
currently the output looks like this:
Username1:Text1Username2:Text2Username3:Text3
Where As i want it to display as:
Username1:Text1
Username2:Text2
Username3:Text3
Cheers for any help