I have a html with an user input and i want that input to be transfered to the nodejs document.
html code:
<script type="text/javascript">
function redirect() {
const name = document.getElementById("field").value;
}
</script>
<form action="stats.html">
<input id="field" type="text" name="name" placeholder="Player Name...">
<input id="button" type="submit" value="SEARCH" onclick="redirect()">
</form>
and the documents are located
index.js
public/index.html