Here is the call in my jade file
extends layout
block content
h1= title
input#input(type="text", result="result") <----------Input called
form(method="post", action="/postquery")
button(type="submit") Search
div
form(method="get", action="/")
button(type="submit") Home
Here is the code I tried to use to call it in "index.js"
router.post('/postquery', function(input, res) {
for (i = 0; i < state.length; i++){
queryResults.push(input);
if (state[i].name == input){
queryResults.push(input);
}
console.log('This is your input: %s',input);
When I print the console log it reads "This is your input: [object Object]"
Aucun commentaire:
Enregistrer un commentaire