<form action="../app.js" name="form"> <input type="text" name="txt"> </form>
Ask how to receive the passed parameters in app.js Not familiar with node, please ask for an answer. Thank you!
In addition, can I pass action=”../app.JS “to other JS files, starting from the www file in the bin directory, so that other js files can listen? The directory is as follows (the project was created in webstorm)
The data submitted by the form can be analyzed through the body-parser module at the back end. the user only needs to call req.body to access the name field of the form element in ejs that you write. if your name field is set to password, then directly use req.body.password!