码迷,mamicode.com
首页 >  
搜索关键字:typeof instanceof    ( 3682个结果
Unity JS 转 C#
用法:js:@Script RequireComponent(Rigidbody) c#:[RequireComponent (typeof (Rigidbody))]js:@System.NonSerializedc#:[NonSerialized()]
分类:编程语言   时间:2015-01-17 11:11:39    阅读次数:159
常用的js
1.onclick("javascript:alert('开始')");其不写javascript也可以,但是对于却必须写javascript,因为不写就自动跳转了,浏览器不识别;2.typeof(变量名):获取对象的类型,每次赋值都有可能出现不同的类型:Number,Object,String,B...
分类:Web程序   时间:2015-01-17 00:57:59    阅读次数:263
Javascript之旅——第八站:说说instanceof踩了一个坑
原文:Javascript之旅——第八站:说说instanceof踩了一个坑 前些天写js遇到了一个instanceof的坑,我们的页面中有一个iframe,我在index页面中计算得到了一个array,然后需要传递到Flight页面 这个嵌套的iframe中的一个函数(SearchFlight)中...
分类:编程语言   时间:2015-01-16 16:02:49    阅读次数:98
js array不支持map filter等的解决办法
if (!Array.prototype.every) {   Array.prototype.every = function(fun /*, thisp*/)   {     var len = this.length;     if (typeof fun != "function")       throw new TypeError();       var thisp...
分类:Web程序   时间:2015-01-16 14:45:01    阅读次数:296
JavaScriptConverter
public class DatePartsConverter : JavaScriptConverter{ public override IEnumerable SupportedTypes { get { yield return typeof(DateTime); } } pu...
分类:编程语言   时间:2015-01-16 11:20:03    阅读次数:325
js 正则笔记
instanceof RegExp //RegExp是JS中的类,同Array类似。然而这个创建方法没有指定表达式内容 varre=newRegExp(); //最简单的正则表达式,将匹配字母are=newRegExp("a"); //重载的构造函数,其第二个参数指定将不区分大小写r...
分类:Web程序   时间:2015-01-16 10:03:09    阅读次数:163
判断JavaScript对象为null或者属性为空
转自:http://blog.csdn.net/yiluoak_47/article/details/7766760首先说下null与undefined区别:对已声明但未初始化的和未声明的变量执行typeof,都返回 "undefined" 。null表示一个空对象指针,typeof操作会返回 "o...
分类:编程语言   时间:2015-01-15 19:58:50    阅读次数:276
C#反射的使用
//(基类)Assembly.Load("当前程序集名称").CreateInstance("命名空间.子类名称")); string assemblyName = typeof(Form1).Assembly.GetName().Name;//程序集名称string nameSpaceClass....
分类:Windows程序   时间:2015-01-15 12:45:39    阅读次数:222
js数组转json
function arrayToJson(o) { var r = []; if (typeof o == "string") return "\"" + o.replace(/([\'\"\\])/g, "\\$1").replace(/(\n)/g, "\\n...
分类:编程语言   时间:2015-01-14 12:41:46    阅读次数:120
socket 怎么设置心跳判断连接
server的代码publicabstractclassServer{ staticreadonlyILoglogger=LogManager.GetLogger(typeof(Server)); publicintPort{get;set;} publiceventClientEventHandl...
分类:其他好文   时间:2015-01-14 12:19:10    阅读次数:148
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!