今天继续研究了bind函数的实现,也知道了shim和polyfill的说法,现在总结一下, 1 if (!Function.prototype.bind) { 2 Function.prototype.bind = function (oThis) { 3 if (typeof this...
分类:
Web程序 时间:
2015-04-25 15:01:59
阅读次数:
150
1 __db = pg_connect('dbname=test');11 }12 13 public static function getInstance(){14 if(!(self::$_instance instanceof self)){15 ...
分类:
Web程序 时间:
2015-04-25 10:35:41
阅读次数:
125
window.onload=function(){ /*给函数原型增加一个extend函数,实现继承*/ Function.prototype.extend = function(superClass){ if(typeof superClass !== 'function'){ throw ...
分类:
Web程序 时间:
2015-04-24 12:30:05
阅读次数:
145
我们一般获取某个类型或对象的属性信息均采用以下几种方法:一、通过类型来获取属性信息var p= typeof(People).GetProperty("Age");//获取指定属性var ps = typeof(People).GetProperties();//获取类型的所有属性二、通过实例来获取...
分类:
其他好文 时间:
2015-04-23 23:14:07
阅读次数:
169
项目中的js需要做国际化,就引入了jQuery.i18n来处理。结果发现当加入如com.test.delete的时候,IE8一直报脚本错误“缺少标识符",而IE9是没有问题的。经过调试发现有这样一句even('typeof ' + fullname + ' == "undefined"');,错误正是由此而来,其中变量fullname的值正好是com.test.delete的时候报了错。经过试验...
分类:
Web程序 时间:
2015-04-22 20:43:03
阅读次数:
111
typeof 判断6种1 //typeof 6种2 console.log(typeof 1); //number3 console.log(typeof ''); //string4 console.log(typeof true); ...
分类:
编程语言 时间:
2015-04-22 00:05:02
阅读次数:
148
关键字:被Java语言赋予了特殊含义的单词其中包含51个关键字和2个预留关键字---------包相关import引入package包---------类型定义:class类interface接口enum枚举---------与其他类型的关系implements实现extends扩允,继承instanceof实例---------安全访问控制private私有的pro..
分类:
编程语言 时间:
2015-04-21 18:32:53
阅读次数:
143
foreach (string mode in Enum.GetNames(typeof(BooleanInteractionMode))) { ledResponseModesComboBox.Items.Add(mode); ...
分类:
编程语言 时间:
2015-04-20 20:42:26
阅读次数:
126
[ToolboxBitmap(typeof(ComboBox))] class ComboBoxEx : ComboBox { public ComboBoxEx() { this.DrawMode = DrawMode.OwnerDra...
分类:
其他好文 时间:
2015-04-20 18:22:31
阅读次数:
129
function addLoadEvent(func){ var oldonload = window.onload; if(typeof window.onload != 'function'){ window.onload = func; }else{ ...
分类:
其他好文 时间:
2015-04-20 14:46:09
阅读次数:
122