<html>
<head><style>body {min-height: 300px;} input { font-size: 16px; } textarea { font-size: 16px; } </style></head>
<body>
<textarea id="feedbackText" type="text" placeholder="Your feedback"></textarea>
<button onclick="submit()">Submit</button>
<script>function submit() {
var feedback = document.getElementById("feedbackText").value;
console.log(feedback);
}</script>
</body>
</html>]]>- Because the element's
value
changes when a user interacts with it - Because we want to display things in the console
- Because we want to update the webpage