随笔分类 -  H5; node.js ; socket ;express

H5
摘要:node.js之写文件 // optfile.js var fs= require('fs');module.exports={ writefile:function(path,data){ //异步方式 fs.writeFile(path, data, function (err) { if (e 阅读全文
posted @ 2016-12-17 21:56 老何de技术日志 阅读(504) 评论(0) 推荐(0)
摘要:js创建一个类然后在另一程序中实例化使用这个类1.创建一个User类// User.js function User(id,name,age){ this.id=id; this.name=name; this.age=age; this.enter=function(){ console.log( 阅读全文
posted @ 2016-11-07 21:45 老何de技术日志 阅读(346) 评论(0) 推荐(0)