如何使用 javascript/jquery 访问嵌套 html 元素的值
我有这段代码:
<td class="fieldValue " id="Contacts_detailView_fieldValue_leadsource" >
<span class="value" data-field-type="picklist" >
<span >Partner</span>
</span>
</td>
如何访问值“Partner”? 谢谢
I have this piece of code:
<td class="fieldValue " id="Contacts_detailView_fieldValue_leadsource" >
<span class="value" data-field-type="picklist" >
<span >Partner</span>
</span>
</td>
how do i access the value "Partner"?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您只需选择父元素,然后从那里转到子元素即可获取innerHtml
You can simply select the parent element and from there go to the child to get the innerHtml
我最终采用了这个解决方案:
谢谢大家的建议!
I finally adopted this solution:
Thank you all for the suggestions!