<script>
$("*", document.body).each(function () {//is document.body a context?
var parentTag = $(this).parent().get(0).tagName;
//Above statement is only selecting the body tag why?
$(this).prepend(document.createTextNode(parentTag + " > "));
});
</script>
</body>
</html>
在上面的脚本中是否有任何理由只选择body标签?document.body也是一个上下文?因为document.body没有被引用它是一个上下文吗?
答案 0 :(得分:1)