The lang and language Properties


The lang and language Properties

The lang property holds an object's language (such as "en" for English), and the language property holds the scripting language for an element. You can see the support for these properties in Table 5.32.

Table 5.32. The lang and language Properties

Property

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

lang

     

x

   

x

x

x

x

 

Read/Write

 

Type: String

language

           

x

x

x

x

 

Read/Write

 

Type: String

Although these properties are primarily meant to be read, you can write them; here's an example:

 document.all.germanLanguageDIV.lang ="de"  document.all.script1.language ="JavaScript" 


Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net