摘要: app.use(express.methodOverride());在app.js中可以看到这个中间件,去翻文档,几乎没有提到.一番寻找,整理如下.作用是使用REST风格的http请求时,进行改写后,可以使app.put或app.delete这类路由设置能够生效.####后端代码:```js// the appapp.put('/users/:id', function (req, res, next) { // edit your user here});```####前端代码:```html// client side must be.. ... ```使用jq的ajax时 阅读全文
posted @ 2013-12-24 11:30 败给坚持 阅读(714) 评论(0) 推荐(0) 编辑