Express' render/redirect does not work if the call isn't coming from a submit method in a form
问题 Task Perform a POST request from a JS method, so that variable values can be sent as parameters. Environment NodeJS Express BodyParser ejs My first attempt Frontend: <html> <head> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js'></script> <script type="text/javascript"> function postAnswer() { $.post('vote', { message: "hello!"}, function(returnedData) { console.log("Post returned data: " + returnedData); }); } </script> </head> <body> <button id='send' onClick=