JavaScript Reference/Javascript Methods/getCharset

Материал из Web эксперт
Перейти к: навигация, поиск

"getCharset()" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript">

   function function1() {
       alert(myDiaHelp.getCharset("Verdana"));
   }

</script> <input type="button" value="GetCharSet" onclick="function1();"> <object id="myDiaHelp"

       classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" 
       width="0px" 
       height="0px">

</object> </body> </html>


     </source>
   
  


"getCharset()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |Dialog Helper | +----------------+--------------------------------------------------------------+

     </source>
   
  


"getCharset()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Returns the character set of the specified font. From http://msdn.microsoft.ru/workshop/author/dhtml/reference/constants/dlgsafehelper_charset.asp. The following are the character sets that can be returned from systems running Microsoft Windows 95 and later. Return Value Character Set 0 ANSI_CHARSET 1 DEFAULT_CHARSET 2 SYMBOL_CHARSET 128 SHIFTJIS_CHARSET 129 HANGEUL_CHARSET 129 HANGUL_CHARSET 134 GB2312_CHARSET 136 CHINESEBIG5_CHARSET 255 OEM_CHARSET The following are character sets that can be returned from systems running Microsoft Windows NT 4.0 and later. Return Value Character Set 77 MAC_CHARSET 130 JOHAB_CHARSET 161 GREEK_CHARSET 162 TURKISH_CHARSET 163 VIETNAMESE_CHARSET 177 HEBREW_CHARSET 178 ARABIC_CHARSET 186 BALTIC_CHARSET 204 RUSSIAN_CHARSET 222 THAI_CHARSET 238 EASTEUROPE_CHARSET

Syntax:

document.all.DialogHelperID.getCharset(param1) Parameters:

   param1   Required; the font name.
   
     
     </source>