use input value in js code example
Example 1: js input value
var x = document.getElementById("myText").value;
Example 2: js get input value
//Using querySelector to get by id
let prodName = document.querySelector("#prodName").value
//Using queryselector to get by class
let prodName = document.querySelector(".prodName").value