①判断是否是整数!function isInteger(obj) {return typeof obj === 'number' && obj%1 === 0}
分类:
Web程序 时间:
2014-07-16 18:54:20
阅读次数:
226
本文转自http://blog.csdn.net/t12x3456/article/details/7341515(1)对于字符串变量来说,使用“==”和“equals()”方法比较字符串时,其比较方法不同。“==”比较两个变量本身的值,即两个对象在内存中的首地址。“equals()”比较字符串中所...
分类:
编程语言 时间:
2014-07-16 17:45:26
阅读次数:
189
近日遇到一个很细的知识点,关于block的循环引用问题,相比很多人都遇到了,也能顺利解决了,至于block方面的技术文章,那就更多了,这里不再赘述,但是有这样一个问题:
What the difference between __weak and __block reference?
使用场景:
__block typeof(self) tmpSelf = self;
[self meth...
分类:
其他好文 时间:
2014-07-16 17:09:11
阅读次数:
203
对于我来说,在编写javascript的代码的时候,对于undefined的判定会写成:function isUndefined(para) { return (para === undefined || typeof para == "undefined");}除此之外看到另外一种判定方法:...
分类:
编程语言 时间:
2014-07-16 17:00:44
阅读次数:
188
1.instanceof和typeof区别两者都是用来判断类型用的,instanceof顾名思义,是否是某一类型的实例,这个返回值是bool值,例如(new String("so") instanceof String) typeof返回值则是类型名,如(typeo...
分类:
编程语言 时间:
2014-07-16 15:31:35
阅读次数:
203
js判断undefined类型
if (reValue== undefined)
{
alert("undefined");
}
发现判断不出来,最后查了下资料要用typeof方法:
if (typeof(reValue) == "undefined")
{
alert("undefined");
}
typeof 返回的是字符串,有...
分类:
Web程序 时间:
2014-07-16 10:58:56
阅读次数:
242
有关js判断undefined类型,使用typeof方法,typeof 返回的是字符串,其中就有一个是undefined。js判断undefined类型if (reValue== undefined){alert("undefined");}发现判断不出来,最后查了下资料要用typeof方法:if ...
分类:
Web程序 时间:
2014-07-16 08:34:23
阅读次数:
439
在js中检测对象类型主要有三种,typeof,...
分类:
Web程序 时间:
2014-07-14 17:07:04
阅读次数:
225
#region 文本框和列表框的click事件 private void tbORcbb_click(object sender, EventArgs e) { if (typeof(TextBox).IsInstanceOfType(sender)) { if (!ifSelected) { ((...
分类:
其他好文 时间:
2014-07-14 08:01:18
阅读次数:
195
private void tbORcbb_leave(object sender, EventArgs e) { if (typeof(TextBox).IsInstanceOfType(sender)) { if (((TextBox)sender).Text.IsNumeric() != tru...
分类:
其他好文 时间:
2014-07-14 08:00:32
阅读次数:
187