1.闭包的概率 子函数可以访问父函数的局部变量,这种行为称为闭包 例子: 1.返回一个闭包function a(){ var num=12; return function b(){ alert(++num); }}var c=a();//c变量指向a()函数的返回函数b...
分类:
编程语言 时间:
2014-06-18 15:52:58
阅读次数:
216
//判断页面加载完毕document.onreadystatechange = function () { if (document.readyState == "complete") { //code... }}//判断是否全为手机String.prototype.isM...
分类:
编程语言 时间:
2014-06-18 15:12:51
阅读次数:
273
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)可伸缩、扩大、缩小(2)可自定义工具栏(依赖工具栏控件),工具栏可定义位置(3)可加装远程数据实现图例客户代码 function addMoreTools() { var toolbar = panel.panel("getToolbar"); ...
分类:
其他好文 时间:
2014-06-17 14:18:18
阅读次数:
264
1.The GetCurrentDirectory function retrieves the current directory for the current processDWORD GetCurrentDirectory( DWORD nBufferLength, // size of d...
分类:
其他好文 时间:
2014-06-17 13:44:58
阅读次数:
206
ajaxfileupload,jquery的一个异步上传插件,使用此插件你可以不用建立form,他会自动生成表单,且自动设置好enctype="multipart/form-data"属性,使用这个插件的前提就是要先引入jquery的包语法:function fileLoad(){ $.ajaxF....
分类:
其他好文 时间:
2014-06-17 12:57:39
阅读次数:
373
//构造函数function Fn(name) { this.name = name; //属性,存放不同的东西}Fn.prototype.showName = function(){ //构造函数.prototype.方法,存放相同的东西,在内存中存放一份 alert(th...
分类:
其他好文 时间:
2014-06-17 12:54:21
阅读次数:
318