Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

This question is not a duplicate of Get meta data attribute in javascriptGet meta data attribute in javascript. I'd like to get meta name by language.

I have the following in HTML code:

<meta name="DC.Subject" xml:lang="pl" content="wróg" /> <meta name="DC.Subject" xml:lang="en" content="enemy" /> 

There are also other meta name tags in HTML.

It is quite easy to get the content of the first DC.Subjectby using:

document.getElementsByName("DC.Description")[0].getAttribute("content"))

and the second by

document.getElementsByName("DC.Description")[1].getAttribute("content"))

But this is not language specific. However, how do I get the content of DC.Description by using xml:lang= in JavaScript?

This question is not a duplicate of Get meta data attribute in javascript. I'd like to get meta name by language.

I have the following in HTML code:

<meta name="DC.Subject" xml:lang="pl" content="wróg" /> <meta name="DC.Subject" xml:lang="en" content="enemy" /> 

There are also other meta name tags in HTML.

It is quite easy to get the content of the first DC.Subjectby using:

document.getElementsByName("DC.Description")[0].getAttribute("content"))

and the second by

document.getElementsByName("DC.Description")[1].getAttribute("content"))

But this is not language specific. However, how do I get the content of DC.Description by using xml:lang= in JavaScript?

This question is not a duplicate of Get meta data attribute in javascript. I'd like to get meta name by language.

I have the following in HTML code:

<meta name="DC.Subject" xml:lang="pl" content="wróg" /> <meta name="DC.Subject" xml:lang="en" content="enemy" /> 

There are also other meta name tags in HTML.

It is quite easy to get the content of the first DC.Subjectby using:

document.getElementsByName("DC.Description")[0].getAttribute("content"))

and the second by

document.getElementsByName("DC.Description")[1].getAttribute("content"))

But this is not language specific. However, how do I get the content of DC.Description by using xml:lang= in JavaScript?

some explanations
Source Link
menteith
  • 690
  • 17
  • 60

This question is not a duplicate of Get meta data attribute in javascript. I'd like to get meta name by language.

I have the following in HTML code:

<meta name="DC.Subject" xml:lang="pl" content="wróg" /> <meta name="DC.Subject" xml:lang="en" content="enemy" /> 

There are also other meta name tags in HTML.

It is quite easy to get the content of the first DC.Subjectby using:

document.getElementsByName("DC.Description")[0].getAttribute("content"))

and the second by

document.getElementsByName("DC.Description")[1].getAttribute("content"))

But this is not language specific. However, how do I get the content of DC.Description by using xml:lang= in JavaScript?

I have the following in HTML code:

<meta name="DC.Subject" xml:lang="pl" content="wróg" /> <meta name="DC.Subject" xml:lang="en" content="enemy" /> 

It is quite easy to get the content of the first DC.Subjectby using:

document.getElementsByName("DC.Description")[0].getAttribute("content"))

and the second by

document.getElementsByName("DC.Description")[1].getAttribute("content"))

However, how do I get the content by using xml:lang= in JavaScript?

This question is not a duplicate of Get meta data attribute in javascript. I'd like to get meta name by language.

I have the following in HTML code:

<meta name="DC.Subject" xml:lang="pl" content="wróg" /> <meta name="DC.Subject" xml:lang="en" content="enemy" /> 

There are also other meta name tags in HTML.

It is quite easy to get the content of the first DC.Subjectby using:

document.getElementsByName("DC.Description")[0].getAttribute("content"))

and the second by

document.getElementsByName("DC.Description")[1].getAttribute("content"))

But this is not language specific. However, how do I get the content of DC.Description by using xml:lang= in JavaScript?

added 6 characters in body
Source Link
connexo
  • 57.2k
  • 15
  • 112
  • 149

I have the following in HTML code:

<meta name="DC.Subject" xml:lang="pl" content="wróg" /> <meta name="DC.Subject" xml:lang="en" content="enemy" /> 

It is quite easy to get the content of the first DC.Subjectby using:

document.getElementsByName("DC.Description")[0].getAttribute("content"))

and the second by

document.getElementsByName("DC.Description")[1].getAttribute("content"))

However, how do I get the content by using xml:lang= in JavaScript?

I have the following in HTML code:

<meta name="DC.Subject" xml:lang="pl" content="wróg" <meta name="DC.Subject" xml:lang="en" content="enemy" 

It is quite easy to get the content of the first DC.Subjectby using:

document.getElementsByName("DC.Description")[0].getAttribute("content"))

and the second by

document.getElementsByName("DC.Description")[1].getAttribute("content"))

However, how do I get the content by using xml:lang= in JavaScript?

I have the following in HTML code:

<meta name="DC.Subject" xml:lang="pl" content="wróg" /> <meta name="DC.Subject" xml:lang="en" content="enemy" /> 

It is quite easy to get the content of the first DC.Subjectby using:

document.getElementsByName("DC.Description")[0].getAttribute("content"))

and the second by

document.getElementsByName("DC.Description")[1].getAttribute("content"))

However, how do I get the content by using xml:lang= in JavaScript?

Source Link
menteith
  • 690
  • 17
  • 60
Loading