【发布时间】:2017-02-18 04:23:58
【问题描述】:
我在 HTML 代码中有以下内容:
<meta name="citation_journal_title" content="Psychological Bulletin" />
使用以下方法很容易获取内容:
document.getElementsByName("citation_journal_title")[0].getAttribute("content")
但是,我无法处理:
<meta property="og:site_name" content="APA PsycNET" />
如何检索og:site_name 的内容?
我知道
How do I get the information from a meta tag with javascript?
的问题,但我正在寻找一些非常简单的东西,比如
document.getElementsByName("citation_journal_title")[0].getAttribute("content")
【问题讨论】:
标签: javascript jquery html attributes selector