Node Express Jade - Checkbox boolean value
问题 I'm using Node+Express+Jade to render some webpages. On a form there are 2 checkboxes. When the form is submitted through POST, if the checkbox is checked, I get req.body.checkbox1 -> 'on' , if isn't checked, I get req.body.checkbox1 -> undefined Is possible to get checkbox value as true or false ? Here's my server side test code var bodyParser = require('body-parser'); var express = require('express'); var app = express(); app.use(bodyParser.urlencoded({extended: true})); app.use(express