已采納回答 / 慕少1471586
var query = Person.findOne({ 'name.last': 'Ghost' });// selecting the `name` and `occupation` fieldsquery.select('name occupation');// execute the query at a later timequery.exec(function (err, person) {? if (err) return handleError(err);? console.log('%s...
2017-06-23
已采納回答 / 慕沐8464911
link(href="/bootstrap/dist/css/bootstrap.css" type='text/css' rel="stylesheet")herf ==> href
2017-06-13
已采納回答 / foxchan
你需要用到 body-parser 這個庫對請求中的參數進行封裝和解析,按照下面的方法操作:npm install --save body-parservar bodyParser = require('body-parser');在你的 express 初始js文件中,添加對于 body-parser 的引用,app.use(bodyParser.urlencoded({ extended: true }));app.use(bodyParser.json());在提交的form中對于input設置na...
2017-02-17