charset attribute | charset property (Internet Explorer)

Switch View :
ScriptFree
charset attribute | charset property

[This documentation is preliminary and is subject to change.]

Sets or retrieves the character set used to encode the object.

Syntax

HTML<element charset="p" ... >
JavaScript

p = object.charset

Property values

Type: String

the character set.

Standards information

Remarks

For a, link, and script objects, you must set the value of this property before you can retrieve it.

You must set the value of this property before you can retrieve it.

In Microsoft Internet Explorer 6, This property now applies to the a, link, and script objects.

 

 

Build date: 3/8/2012

Community Content

yecril
Not for META

The CHARSET attribute does not apply to the META element, as of W3C DOM.


yecril
Charset affects presentation
In order to apply a new character set to the document content displayed, you have to execute the command "Refresh" after setting the charset attribute. Calling WINDOW.OPEN(URL, "_self") resets the document character set to the default value.