JavaScript Reference/Javascript Properties/acceptCharset

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

"acceptCharset" Example

   <source lang="javascript">
   

<html> <head> <script language="JavaScript"> function goAcceptCharset() {

   alert(document.all.myForm.acceptCharset);

} </script> </head> <body onLoad="goAcceptCharset();"> <form id="myForm" method="post" action="" acceptcharset="UTF-8"> some input fields </form> </body> </html>


     </source>
   
  


"acceptCharset" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<form> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"acceptCharset" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Sets a comma- or space-separated character sets. Default value is UTF-8 character set.

Syntax:

document.getElementById("formID").acceptCharset = value document.all.formID.acceptCharset = value // IE only


     </source>