jquery源码: jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context );
属性名必须是字符串,非字符串对象不能用来作为一个对象属性的键,任何非字符串对象,包括number,可通过toString()方法,类型转换成一个字符串1 1,Object基本格式 <script type="text/javascript"> var o = {}; var o = {a:'foo',b:42,c:{}} console.log(o)</script> 2,Object基本格式 <script type="text/javascr