摘要: 步骤一,引入required模块 我们使用require指令来载入http模块,并将实例化的HTTP赋值给变量http 步骤二,创建服务器 接下来我们使用http.createServer()方法创建服务器,并使用listen方法绑定8888端口。函数通过request,response参数来接收和 阅读全文
posted @ 2017-09-28 14:44 千寻的天空之城 阅读(126) 评论(0) 推荐(0) 编辑
摘要: var a = 3.7; // alert(parseInt(a)); //去掉小数部分---3 // alert(Math.ceil(a)); //4 向上取整,3.01返回的也是4, 3.6返回的也是4 alert(Math.floor(a)); //向下取去整 ----3 // alert(Math.round(a)); // 四舍五入 ... 阅读全文
posted @ 2017-09-28 10:08 千寻的天空之城 阅读(611) 评论(0) 推荐(0) 编辑