前一阶段看到大神在网上贴出的测试个人js理解的代码. 在此我在此借用大神的代码,进行自我复述,大神文章参见:http://www.imooc.com/article/1731 代码1: function foo(){ console.log(this.a); } function doFoo(fn){ fn(); } function doFoo2(o){ o.foo(); } var obj = { a: 2, foo: foo }; var a = "I'm an a"; doFo…
在开发中,有时候,我们需要根据不同的内容来动态生成二维码,则可以使用qrcode.js这个小插件来实现. 1.qrcode.js文件内容: (1)未压缩(qrcode.js): /** * @fileoverview * - Using the 'QRCode for Javascript library' * - Fixed dataset of 'QRCode for Javascript library' for support full-spec. * - this library ha…
在很久很久以前,就已经看过 60行Js的俄罗斯方块源码.无奈当时能力不够看明白,当时觉得就是个神作. 现在总算有空再看了,顺便用c#实现一遍(超过60行),顺道熟悉下Js API. 网上其他博客也有分析:教你看懂网上流传的60行JavaScript代码俄罗斯方块游戏 60行JS实现俄罗斯方块,这里就不再详述了,直接上代码. Tetris.cs using System; using System.Collections.Generic; using System.Linq; using Sy…