板块 / 编程 / Js、Css、Html
编程前端技术相关分享,欢迎来稿 ~ 欢迎记录你的编程生活点点滴滴!
最新文章
-
【NodeJs】Http: 基本服务
varhttp=require('http');varserver=http.createServer(function(req,res){ console.log(req.url); res.writeHead(200,{'Conte......
Nemo 2016.08.01 21:48 3311浏览 0回复
阅读更多 -
Jquery 跳出each
原本以为在jquery跳出循环可以直接使用continue和break了,但是使用之后没有效果,因为在jquery中没有这两条命令。后来上网查了下,得到了结果:returnfalse;——跳出所有循环;相当于js中的break效果。returntrue;——跳出当前循环,进入下一个循环;相当于javascript中的continue效果functioncheck(){ &nb......
Nemo 2016.07.22 15:54 3637浏览 0回复
阅读更多 -
jquery 对 Json 的各种遍历
在JSON中,有两种结构:对象和数组。1.对象一个对象以“{”开始,“}”结束。每个“key”后跟一“:”,“‘key/value’对”之间运用“,”分隔。packJson={"name":"caibaojian.com","password":"111"}2.数组packJson=[{"name":"caibaojian.com","password":"111"},{"name":"tony"......
Nemo 2016.07.11 15:46 2526浏览 0回复
阅读更多 -
[NodeJs]HTTP
varoptions={ hostname:'www.imooc.com', port:80, path:'/course/docomment', method:'POST', &n......
Nemo 2016.07.05 15:56 5223浏览 0回复
阅读更多 -
[Nodejs]第一个爬虫
varhttp=require('http');varcheerio=require('cheerio');varurl='http://www.link-nemo.com/Cynthia/index.do';functionfilterChapters(html){ var$=cheerio.load(html);......
Nemo 2016.07.05 13:57 2809浏览 2回复
阅读更多 -
[NodeJS] FS模块
1、FS模块跟其他模块不同,所有的操作都提供了异步和同步两种方式。2、fs.readFile(filename,[ecoding],[callback(err,data)])异步式读取文件,文件不会被阻塞在读取文件的地方,而会继续往下执行。文件操作完成后,需要通过回调函数指定相应的操作。如果发生异常,会通过回调函数中的err参数通知。文件的内容会通过回调函数传递。=================......
Nemo 2016.06.20 22:24 5164浏览 0回复
阅读更多 -
【NodeJs]events.EventEmitter事件
events模块只提供了一个对象:events.EventEmitter.EventEmitter的核心就是事件发射与事件监听器功能的封装。//为指定事件注册监听器,接受一个字符串event和一个回调函数listenerEventEmitter.on(event,listener)//发射event事件,传递若干可选参数到事件监听器的参数表EventEmitter.emit(event,[arg1......
Nemo 2016.06.17 00:25 1442浏览 0回复
阅读更多 -
【NodeJS]Util.inspect实体属性输出
varutil=require('util');functionPerson(){ this.name='Nemo'; this.toString=function(){ returnthis.name; }}varobj=ne......
Nemo 2016.06.17 00:12 1872浏览 0回复
阅读更多 -
[NodeJS]Util.inherits,原型继承
//引入util模块varutil=require('util');//定义函数BasefunctionBase(){ //定义全局变量name和year this.name='Nemo'; this.year=2016; //定义了一个私有的sayHello方法......
Nemo 2016.06.17 00:06 2361浏览 0回复
阅读更多 -
[NodeJS]学习资源
1.学习路线图http://blog.fens.me/nodejs-roadmap/2.视频http://www.icoolxue.com/album/show/89http://www.imooc.com/learn/3483.在线文档http://www.runoob.com/nodejs/nodejs-tutorial.htmlhttps://nodejs.org/api/
Nemo 2016.06.14 23:49 3002浏览 0回复
阅读更多 -
[NodeJS]读取文件
varfs=require('fs'); fs.readFile('file.txt','utf-8',function(err,data){ if(err){ &n......
Nemo 2016.06.13 21:16 4229浏览 0回复
阅读更多 -
[NodeJS]npm 的使用
安装$npminstallexpress-gnpmWARNcheckPermissionsMissingwriteaccessto/usr/local/lib/usr/local/lib└─┬express@4.13.4├─┬accepts@1.2.13│├─┬mime-types@2.1.11││└──mime-db@1.23.0│└──negotiator@0.5.3├──array-flat......
Nemo 2016.06.13 21:07 3641浏览 0回复
阅读更多 -
[NodeJS]第一个服务器端程序
$vimfirstServer.js输入:varhttp=require('http');http.createServer(function(request,response){ response.writeHead(200,{'Content-Type':'text/plain'}); response......
Nemo 2016.06.13 20:59 3686浏览 0回复
阅读更多 -
[NodeJS]Ubuntu下部署nodejs环境
有两种方式:1、$sudogitclonehttps://github.com/nodejs/node.git$sudochmod-R755node$cdnode$sudo./configure$sudomake$sudomakeinstall即可完成。输入:$node-v查看Nodejs版本。2、直接使用apt-get方式安装:$sudoapt-getinstallnodejs$sudoapt-......
Nemo 2016.06.13 20:57 3479浏览 0回复
阅读更多 -
Jquery attr和prop
functionmcheckAll(obj,parentid){ varmtarget=$('#'+parentid+"input[type='checkbox']"); if(obj.checked){ //check&nb......
Nemo 2016.05.09 15:44 3826浏览 0回复
阅读更多
文章总数:49