JavaScript Reference/Javascript Properties/encoding

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

"encoding" Example

   <source lang="javascript">
   

<html> <body> <form id="fm" method="post"> <button onclick="alert(document.all.fm.encoding);">encoding</button> <button onclick="alert(document.all.fm.enctype);">enctype</button> </form> </body> </html>


     </source>
   
  


"encoding" is applied to

   <source lang="javascript">

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

     </source>
   
  


"encoding" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Sets the MIME content type code, alerting the server that the data submitted is in a MIME type.

Default value: application/x-www-form-urlencoded.


Syntax:

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


     </source>