一、 创建pathtest.js文件 var http= require('http' ); var url= require('url' ); function start (){ function onRequest(request ,response){ var pathname =url . ...
分类:
Web程序 时间:
2016-08-24 11:15:46
阅读次数:
245
事件对象:event (包含着很多和该次事件想关的信息的对象) 只有在事件函数里面才有意义 火狐:事件函数的第一个形参,就代表事件对象 //alert( event ); document.onclick = function(goudan){ goudan = goudan || event; a ...
分类:
其他好文 时间:
2016-08-24 11:13:37
阅读次数:
113
We'll learn how to take advantage of Ramda's automatic function currying and data-last argument order to combine a series of pure functions into a lef ...
分类:
Web程序 时间:
2016-08-24 06:38:50
阅读次数:
305
历史管理 ?onhashchange :改变hash值来管理 window.location.hash=''; window.onhashchange=function(){} ?history : –服务器下运行 –pushState : 三个参数 :数据 标题(都没实现) 地址(可选) –pop ...
分类:
其他好文 时间:
2016-08-24 01:08:32
阅读次数:
145
两个方法: currentStyle针对ie浏览器 getComputedStyle针对firefox浏览器 通过一个方法来获取 //obj 是dom元素 function getStyle(obj, attr) { if (obj.currentStyle) { return obj.curren ...
分类:
其他好文 时间:
2016-08-24 01:04:49
阅读次数:
160
ES6今年开始学的,从看文档到实践,以下是自己使用过的一些ES6的东西: 1:for-of 语法: 最喜欢的还是它支持了break/continue的语法,而且还修改了for-in的缺陷,简要写法: for(let item of dataList){} 2:箭头函数 Arrow Function ...
分类:
其他好文 时间:
2016-08-24 00:47:10
阅读次数:
768
最近用reactjs写个h5 应用,封装一个model。然而使用这个model时候 总是报错: Element type is invalid: expected a string (for built-in components) or a class/function (for composit ...
分类:
其他好文 时间:
2016-08-23 23:37:33
阅读次数:
250
前台HTML: " onclick="javascript:showimage('');" /> ? 实现JS: //显示大图 function showi... ...
分类:
其他好文 时间:
2016-08-23 23:15:28
阅读次数:
3565
原文链接:https://swordair.com/function-and-exclamation-mark/ 最近有空可以让我静下心来看看各种代码,function与感叹号的频繁出现,让我回想起2个月前我回杭州最后参加团队会议的时候,@西子剑影抛出的一样的问题:如果在function之前加上感叹 ...
分类:
其他好文 时间:
2016-08-23 21:54:08
阅读次数:
144
PHP 变量作用域 变量的作用域是脚本中变量可被引用/使用的部分。 PHP 有四种不同的变量作用域: local global static parameter 变量:内部函数变量访问全局变量的时候需要添加global: 例子: <?php $x=10; $y=23; function add(){ ...
分类:
Web程序 时间:
2016-08-23 21:45:27
阅读次数:
268