📅  最后修改于: 2022-03-11 15:04:30.680000             🧑  作者: Mango
const bodyParser = require('body-parser');
app.use(bodyParser.urlencoded());
app.post("/your/page", function (req, res) {
const show_modal = !!req.body.modal; // Cast to boolean
res.render("page", { show_modal });
}