摘要: typeof的运算数未定义,返回的就是 "undefined". 运算数为数字 typeof(x) = "number" 字符串 typeof(x) = "string" 布尔值 typeof(x) = "boolean" 对象,数组和null typeof(x) = "object" 函数 typ 阅读全文
posted @ 2017-08-27 21:08 开始战斗 阅读(484) 评论(0) 推荐(0) 编辑
摘要: <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 开始战斗 阅读(157) 评论(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 开始战斗 阅读(238) 评论(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 开始战斗 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 生成一个node项目1.创建文件夹2.文件夹中右键->在此处打开命令窗口->文件夹中打开dos3.执行:npm init //一路回车,最后y4.安装插件: C:\www\nodejs\hello>npm install async --save-dev 阅读全文
posted @ 2017-08-27 11:41 开始战斗 阅读(358) 评论(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 开始战斗 阅读(761) 评论(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 开始战斗 阅读(170) 评论(0) 推荐(0) 编辑
摘要: var async = require('async'); //串行无关联series//串行有关联waterfall//并行:parallel //会把各个函数的执行结果一起放到最后的回调中async.parallel([ function(cb) { setTimeout(function(){ 阅读全文
posted @ 2017-08-27 11:15 开始战斗 阅读(194) 评论(0) 推荐(0) 编辑
摘要: var async = require('async'); //串行无关联series//串行有关联waterfallasync.waterfall([ function(cb) { setTimeout(function(){ console.log('111111111'); cb(null, 阅读全文
posted @ 2017-08-27 11:14 开始战斗 阅读(377) 评论(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 开始战斗 阅读(267) 评论(0) 推荐(0) 编辑