js闭包的作用是使函数外可以访问函数内部的变量,是通过 在函数内部 定义 访问函数内变量 的函数实现的,内部的一个函数产生一个闭包function a(){ var i=0; return function (){return ++i;}};var c=a(); // 得到函数bc(); ...
分类:
Web程序 时间:
2014-06-18 13:31:35
阅读次数:
178
BACKGROUND OF INVENTIONThis invention relates to a system and method for providing a native function call facility. In particular it relates to a syst...
分类:
编程语言 时间:
2014-06-18 13:24:05
阅读次数:
400
页面初始化时,所有商品全是默认图片当屏幕向下滚动,超过下边框的所有图片都显示//图片懒加载(各分类:商品列表页)var waterfull = { init: function(col) { window.onscroll=this.throttle(this.isScroll...
分类:
其他好文 时间:
2014-06-18 13:22:53
阅读次数:
240
A Memoization Pattern is a kind of JavaScript Pattern you can use to cache the result of a function with the arguments of the function as the key of t...
分类:
编程语言 时间:
2014-06-18 13:17:25
阅读次数:
401
1 $(".content").each(function(){ 2 if($(this).text().length>100){3 $(this).text($(this).tex...
分类:
Web程序 时间:
2014-06-18 13:13:18
阅读次数:
253
1. 下载安装Djangopip install Django==1.6.5测试是否安装成功>>> import django>>> djan.VERSION>>> django.VERSION(1, 6, 5, 'final', 0)2. 安装数据库MySQL说明:使用python连接到MySQL...
分类:
系统相关 时间:
2014-06-18 13:10:48
阅读次数:
288
1 $(document).ready(function(){ 2 var winH = $(window).height(); //页面可视区域高度 3 $(window).scroll(function () { 4 var pageH = $(docum...
分类:
Web程序 时间:
2014-06-18 12:55:00
阅读次数:
179
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:
其他好文 时间:
2014-06-18 12:32:58
阅读次数:
169
共有的表单字段方法每个表单字段都有两个方法:focus()和blur(),其中focus()用于将浏览器焦点设置到表单字段,激活表单字段。可以侦听页面的load事件EventUtil.addHandler(window,"load",function(event){ document.fo...
分类:
编程语言 时间:
2014-06-17 22:45:07
阅读次数:
391
二叉树的插入与删除,来自Mark Allen Weiss的《数据结构与算法分析》。# Definition for a binary tree nodeclass TreeNode: def __init__(self, x): self.val = x self...
分类:
编程语言 时间:
2014-06-17 14:25:01
阅读次数:
291