[英]Select element in Chrome Dev Tools not working?
I'm using the Chrome DevTools console to try to select elements in this page: http://www.ncbi.nlm.nih.gov/pubmed/?term=The+DIAMOND+(DHA+Intake+And+Measurement+Of+Neural+Development)+Study%3A+a+double-masked%2C+randomized+controlled+clinical+trial+of+the+maturation+of+infant+visual+acuity+as+a+function+of+the+dietary+level+of+docosahexaenoic+acid 我正在使用Chrome DevTools控制台尝试选择此页面中的元素: http ://www.ncbi.nlm.nih.gov/pubmed/?term=The+DIAMOND+(DHA+Intake+And+Measurement+Of+ 神经+发展)+研究%3A + A +双盲%2C +的随机+受控+临床+试验+ + +婴儿+视觉+敏度的+成熟+ + AS +的+食物的+ A +功能+ +水平+ +二十二碳六酸+
But I'm finding that everything I try to select returns null. 但是我发现我尝试选择的所有内容都返回null。 For example, if I type
$('body')
into the console, it returns null: 例如,如果我在控制台中键入
$('body')
,它将返回null:
Why is this happening? 为什么会这样呢? There is definitely a
<body>
tag in the page. 页面中肯定有一个
<body>
标记。
And the same $('body')
query in the console on other sites returns an element. 在其他站点的控制台中,相同的
$('body')
查询返回一个元素。
this site overwrites $
funtion. 该站点将覆盖
$
功能。 use jQuery
instead. 改用
jQuery
。
jQuery('body'); //Object { 0: <body>, context: HTMLDocument → pubmed, selector: "body", length: 1 }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.