2014年8月31日

js中typeof与instanceof的不同用法

摘要: typeof用以获取一个变量或者表达式的类型,typeof一般只能返回如下几个结果:number,boolean,string,function(函数),object(NULL,数组,对象),undefined。如:alert(typeof (123));//typeof(123)返回"number... 阅读全文

posted @ 2014-08-31 22:05 undefined==null 阅读(168) 评论(0) 推荐(0) 编辑

js中apply方法的使用

摘要: 1、对象的继承,一般的做法是复制:Object.extendprototype.js的实现方式是:Object.extend = function(destination, source) {for (property in source) {destination[property] = sour... 阅读全文

posted @ 2014-08-31 16:48 undefined==null 阅读(838) 评论(0) 推荐(0) 编辑

导航