1//This will give you the input of the text area
2let value = document.getElementById('myTextarea').value;
1<!DOCTYPE html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<title>Get Text Input Field Value in JavaScript</title>
6</head>
7<body>
8 <input type="text" placeholder="Type something..." id="myInput">
9 <button type="button" onclick="getInputValue();">Get Value</button>
10
11 <script>
12 function getInputValue(){
13 // Selecting the input element and get its value
14 var inputVal = document.getElementById("myInput").value;
15
16 // Displaying the value
17 alert(inputVal);
18 }
19 </script>
20</body>
21</html>