摘要: 1、eval:ts:declare function eval(x: string): any;js:/**@param {*} x@return {Object}*/eval = function(x) {};说明eval接收的是一个字符串,返回值:?返回值为any,即是任何类型。参考资料解释:通... 阅读全文
posted @ 2016-01-12 17:30 黑客PK 阅读(694) 评论(0) 推荐(0) 编辑
摘要: jquery源码:1 jQuery = function( selector, context ) {2 3 // The jQuery object is actually just the init constructor 'enhanced'4 // Need ... 阅读全文
posted @ 2016-01-12 16:05 黑客PK 阅读(1986) 评论(0) 推荐(0) 编辑
摘要: 首先event是在事件发生的时候产生的,所以必须在事件发生的事件监听函数里面使用他。不然的话就没用的。会找不到这个事件;错误的写法:报错的内容:正确的写法: 阅读全文
posted @ 2016-01-12 16:00 黑客PK 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 @type {Number} 3 @const 4 */ 5 NaN = 0; 6 /** 7 @type {Number} 8 */ 9 Infinity = 0; 10 undefined = 0; 11 /** 12 @param {*} x 13 @ret... 阅读全文
posted @ 2016-01-12 13:47 黑客PK 阅读(773) 评论(0) 推荐(0) 编辑