摘要: 1 /*在node中,可以使用require()函数来加载模块. 2 * require函数使用一个参数,参数值可以带有完整路径的模块的文件名,也可以为模块名.当使用node中提供的模块时,在require函数中只需要指定模块名即可. 3 * */ 4 //建立一个页面2.js;代码如下 5 ... 阅读全文
posted @ 2014-10-02 11:46 思思博士 阅读(453) 评论(0) 推荐(0)
摘要: 1 var testFunction=function(){2 console.log("guoyansi");3 }4 var timer=setInterval(testFunction,1000);5 timer.unref();//取消setTimeout和setInterval函數... 阅读全文
posted @ 2014-10-02 09:56 思思博士 阅读(557) 评论(0) 推荐(1)