摘要: <tr> <td align='left'>手持证件照:</td><td><input type="file" name="photo" id="idphotoView" onchange="idphotoChange(this.id,'imgPre');" /> <img id="imgPre" 阅读全文
posted @ 2017-08-27 21:06 开始战斗 阅读(171) 评论(0) 推荐(0)
摘要: 1.Node.js Express 框架安装:npm install express --save在当前目录下创建一个node_modules 2.安装必要的中间件npm install body-parser --savenpm install cookie-parser --savenpm in 阅读全文
posted @ 2017-08-27 13:59 开始战斗 阅读(246) 评论(0) 推荐(0)
摘要: 1.安装express-session npm install express-session --save-dev //注意-g无效 2.app.jsvar session = require('express-session'); app.use(cookieParser()); //必须在此行 阅读全文
posted @ 2017-08-27 11:46 开始战斗 阅读(520) 评论(0) 推荐(0)
摘要: 生成一个node项目1.创建文件夹2.文件夹中右键->在此处打开命令窗口->文件夹中打开dos3.执行:npm init //一路回车,最后y4.安装插件: C:\www\nodejs\hello>npm install async --save-dev 阅读全文
posted @ 2017-08-27 11:41 开始战斗 阅读(364) 评论(0) 推荐(0)
摘要: 1.同步:var async = require("async"); async.series([step1, step2, step3],function(err, values) { do somethig with the err or values v1v2v3});var async = 阅读全文
posted @ 2017-08-27 11:16 开始战斗 阅读(773) 评论(0) 推荐(0)
摘要: http://cnodejs.org/topic/54acfbb5ce87bace2444cbfb 先安装:G:\www\nodejs\one\models>npm install async --save-dev 1.串行无关联:async.series(tasks,callback);多个函数依 阅读全文
posted @ 2017-08-27 11:16 开始战斗 阅读(178) 评论(0) 推荐(0)
摘要: var async = require('async'); //串行无关联series//串行有关联waterfall//并行:parallel //会把各个函数的执行结果一起放到最后的回调中async.parallel([ function(cb) { setTimeout(function(){ 阅读全文
posted @ 2017-08-27 11:15 开始战斗 阅读(202) 评论(0) 推荐(0)
摘要: var async = require('async'); //串行无关联series//串行有关联waterfallasync.waterfall([ function(cb) { setTimeout(function(){ console.log('111111111'); cb(null, 阅读全文
posted @ 2017-08-27 11:14 开始战斗 阅读(385) 评论(0) 推荐(0)
摘要: var async = require('async'); //串行无关联async.series({ one:function(cb) { setTimeout(function(){ console.log('111111111'); cb('有错', 1); }, 3000); }, two: 阅读全文
posted @ 2017-08-27 11:13 开始战斗 阅读(277) 评论(0) 推荐(0)
摘要: 方法一: 支持中文,图片显示 // 文件上传 router.post('/imgupload',function(req,res){ // var form = new multiparty.Form(); //设置编辑 form.encoding = 'utf-8'; //设置文件存储路径 for 阅读全文
posted @ 2017-08-27 11:12 开始战斗 阅读(371) 评论(0) 推荐(0)