I want to get the user input from 3 labels and display onto an alert box. I am trying to use the queryAllSelector to grab the 3 id’s from the labels which works. But when I try to type into the boxes and press the button to display the alert box, it just says [object NodeList].
HTML
<meta charset="UTF-8">
<title>Form</title>
<link href="form.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
<form>
<label class="title">Title:</label><br>
<input type="text" id="form-scream1" name="Title" placeholder="Enter Text">
<br>
<label class="title" for="body text">Body Text:</label><br>
<input type="text" id="form-scream2" name="Body Text" placeholder="Write Something...">
<br>
<label class="title">Button For text:</label><br>
<label for="bodyy"></label><input type="text" id="form-scream3" name="Body Text" placeholder="Text">
</form>
<button onclick="getinput()"> platypus</button>
</div>
<script>
function getinput()
{
const inputVal = document.querySelectorAll("#form-scream1, #form-scream2, #form-scream3");
alert(inputVal);
}
</script>
</body>
</html>