Extract lang value using JavaScript
<p>I am trying to get the lang value from the HTML tag, but the current JavaScript I am using doesn't work.</p>

<p>This is the HTML code I am trying to access:</p>

<pre><code>&lt;html  lang="it-IT"&gt;
</code></pre>

<p>And the Javascript</p>

<pre><code>if(navigator.appName == 'Netscape')
{
    langType = navigator.language;
}
else
{
    langType = navigator.browserLanguage;
}
</code></pre>

<p>but in testing I still get the value "EN-us"</p>

<p>Can anyone help?</p>

<p>Thanks!</p>
