javascript中巧用“闭包”实现程序的暂停执行功能
发布时间:2007-04-04 作者: 来源:转载
Author:月影Form:http://bbs.51js.com/thread-66361-1-1.html/*基本原理*/varst=(function(){alert(1);alert(2);returnfunction(){alert(3);alert(4);}})();/*函数*/functiontest(x){alert(x++);alert(x++);returnfunction(){alert(x++);alert(x++);}}varst=
Author:月影
Form:http://bbs.51js.com/thread-66361-1-1.html