I have the following in HTML code:
<meta name="citation_journal_title" content="Psychological Bulletin" />
It is quite easy to get the content by using:
document.getElementsByName("citation_journal_title")[0].getAttribute("content")
However, I cannot deal with this:
<meta property="og:site_name" content="APA PsycNET" />
How do you retrieve the content of og:site_name
?
I am aware of the question
How do I get the information from a meta tag with javascript?
but I'm looking for something quite simple like
document.getElementsByName("citation_journal_title")[0].getAttribute("content")