To get text box value in JavaScript, we use the value
property.
For instance, we write
<input type="text" name="txtJob" id="txtJob" value="software engineer" />
to add an input.
Then we write
const job = document.getElementById("txtJob").value;
to select the input with getElementById
.
And then we get its input value with the value
property.