@m3g4p0p
thanks dude.
it works.
Here are the complete codes…
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<style type="text/css">
</style>
</head>
<body>
<button id="done" type="button">Click Me!</button>
<br><br>
<textarea id="right-answer" rows="4" cols="50">
</textarea>
<script>
var answer = 'Testing...';
var button = document.getElementById('done');
var textarea = document.getElementById('right-answer');
button.addEventListener('click', function() {
textarea.value = answer;
});
</script>
</body>
</html>
thanks again.