[<h1>, prevObject: e.fn.e.init[1], context: #document, selector: "h1"]
我如何得到结果看起来像上面?console.log在铬看起来很奇怪的jquery元素
这是我使用的命令:console.log($('h1'));
任何人都可以得到像我一样的结果在版本23.0.1271.64米?
[<h1>, prevObject: e.fn.e.init[1], context: #document, selector: "h1"]
我如何得到结果看起来像上面?console.log在铬看起来很奇怪的jquery元素
这是我使用的命令:console.log($('h1'));
任何人都可以得到像我一样的结果在版本23.0.1271.64米?
当然,你正在寻找完整的HTML元素
使用console.log($('h1').get(0));
检查性能
或者console.log($('h1')[0]);
你正在寻找一个jQuery对象的所有子属性。
如果您点击Firefox中的+,你会看到相同的属性..(加上所有继承的方法)
为什么你认为这是奇怪吗?你能指望什么? – undefined
Dupe of http://stackoverflow.com/questions/13552432/show-html-when-logging-jquery-object-in-chrome-dev-tools-console – mikemaccana