黑铁时代
Programing is not only one kind of technology, but also one kind of art.
摘要: JavaScript的面向对象主要是基于原型进行实现,传统的写法在开发中很不方便,于是创建一个工厂类,用于创建“类”。 /** * Clone the attribute * @param attribute */执行深拷贝,主要是针对那些属于对象类型的属性,进行克隆var cloneAttribute = function( attribute ) {switch( Object.prototype.toString.call( attribute ) ) { // Null case '[object Null]': return null; break; ... 阅读全文
posted @ 2012-09-23 23:25 黑铁时代 阅读(366) 评论(0) 推荐(0) 编辑