Friday, February 23, 2024
 Popular · Latest · Hot · Upcoming
102
rated 0 times [  105] [ 3]  / answers: 1 / hits: 76664  / 15 Years ago, thu, june 4, 2009, 12:00:00

How to obtain lang attribute in HTML using JavaScript?



<html xmlns=http://www.w3.org/1999/xhtml xml:lang=en lang=en>

More From » html

 Answers
10

If both attributes agree on their values (as they should), it's enough to read either of them. I'd suggest using



document.documentElement.lang

[#99386] Monday, June 1, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ellisc

Total Points: 533
Total Questions: 82
Total Answers: 90

Location: Bangladesh
Member since Thu, Aug 5, 2021
3 Years ago
ellisc questions
Mon, Nov 15, 21, 00:00, 2 Years ago
Sat, Jun 26, 21, 00:00, 3 Years ago
Mon, Nov 16, 20, 00:00, 3 Years ago
Sun, Apr 26, 20, 00:00, 4 Years ago
;