JavaScript Reference/Javascript Properties/enctype

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

"enctype" 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>
   
  


"enctype" is applied to

   <source lang="javascript">

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

     </source>
   
  


"enctype" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Provides the same functionality as the encoding property.

Syntax:

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


     </source>