javascript - 使用 querySelectorAll 选择而不选择特定元素
问题描述
我有一个这样的 HTML 结构:
<article class="post-content-area post type-post status-publish hentry">
<div class="some-class">
<div class="entry-content">
content goes here
</div>
</div>
</article>
或者
<article class="post-content-area post type-post status-publish hentry">
<div class="entry-content">
content goes here
</div>
</article>
无论嵌套如何,我都需要选择entry-content
带有类的标签内的类。post-content-area post type-post status-publish hentry
entry-content
我试过了document.querySelectorAll("(post-content-area.post.type-post.status-publish.hentry)> .entry-content")
但它没有用
解决方案
推荐阅读
- groovy - SOAP UI - 为相同的 REST API 端点的两个不同的 POST 请求有效负载返回两个不同的响应
- javascript - 显示可以在控制台上看到的用户 Internet 断开连接错误
- android - 没有地址栏的 WebView 有不同的行为
- flutter - 从不透明度小部件颤动中排除形状
- html - 表单输入组追加前置 - 是否缺少样式?(BS4)
- python - django url 没有正确重定向
- prometheus - Grafana 和普罗米修斯:今天算数
- android - 如何修复“Picasso.get().load(mContext).into(imageView)”
- azure - Azure Translator API 总是给我 404
- selenium - 如何选择带有标签标签文本节点值的div标签