上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页
摘要: 1. JSON.stringify(obj/arr) js对象(数组)转换为json对象(数组) 2. JSON.parse(json) json对象(数组)转换为js对象(数组) 阅读全文
posted @ 2019-12-08 12:29 distant-遥远 阅读(676) 评论(0) 推荐(0)
摘要: Es5 严格模式 http://www.ruanyifeng.com/blog/2013/01/javascript_strict_mode.html 除了正常运行模式(混杂模式),ES5添加了第二种运行模式:"严格模式"(strict mode)。 - 顾名思义,这种模式使得Javascript在 阅读全文
posted @ 2019-12-08 12:28 distant-遥远 阅读(504) 评论(0) 推荐(0)
摘要: use myblog; -- show tables -- 插入语句 -- insert into users(username,`password`,realname) values('遥远','123','ooo'); -- 查询users所有列 -- select *from users; -- 查询id username 列 -- select id, username from user 阅读全文
posted @ 2019-12-06 16:37 distant-遥远 阅读(218) 评论(0) 推荐(0)
摘要: 文件结构图 { "next":"b.json", "msg":"this is a" } { "next":"c.json", "msg":"this is b" } { "next":"null", "msg":"this is c" } 上一层 阅读全文
posted @ 2019-12-06 11:45 distant-遥远 阅读(500) 评论(0) 推荐(0)
摘要: 学习搭建服务器可用postman 连接不了localhost的端口 网上好多教程是这样连接 看完视频后我们是这样 找了大量资料都解决不了,什么版本,什么证书的都不好使,最简单的就是去掉http:// //get 测试 const http=require('http') const querystr 阅读全文
posted @ 2019-12-05 17:20 distant-遥远 阅读(6647) 评论(0) 推荐(2)
摘要: //nodejs 处理post请求 // 异步 const http =require('http') const server=http.createServer((req,res)=>{ if(req.method=='POST'){ let postData='' req.on('data',chunk=>{ postData +=chunk.tostring() }) req.on('en 阅读全文
posted @ 2019-12-04 14:36 distant-遥远 阅读(584) 评论(0) 推荐(0)
摘要: http querystring 要从查询字符串中提取参数,可以使用 require('querystring').parse 函数,或者可以将 true 作为第二个参数传递给 require('url').parse: 阅读全文
posted @ 2019-12-04 13:41 distant-遥远 阅读(159) 评论(0) 推荐(0)
摘要: 所有函数都有一个特别的属性: * `prototype` : 显式原型属性* 所有实例对象都有一个特别的属性: * `__proto__` : 隐式原型属性 * 显式原型与隐式原型的关系 * 函数的prototype: 定义函数时被自动赋值, 值默认为{}, 即用为原型对象 * 实例对象的__pro 阅读全文
posted @ 2019-11-26 14:12 distant-遥远 阅读(222) 评论(0) 推荐(0)
摘要: * 所有函数都有一个特别的属性: * `prototype` : 显式原型属性* 所有实例对象都有一个特别的属性: * `__proto__` : 隐式原型属性 1. 每个函数都有一个prototype属性, 它默认指向一个对象 objectg(即称为: 原型对象) * 显式原型与隐式原型的关系 * 阅读全文
posted @ 2019-11-24 16:27 distant-遥远 阅读(185) 评论(0) 推荐(0)
摘要: ## 数据类型的分类和判断 * 基本(值)类型* Number 任意数值 typeof* String 任意字符串 typeof* Boolean true/false typeof* undefined undefined typeof/ * null null * 对象(引用)类型* Objec 阅读全文
posted @ 2019-11-23 17:49 distant-遥远 阅读(172) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页