JavaScript Reference/Javascript Properties/enctype

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

"enctype" Example

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



"enctype" is applied to

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



"enctype" Syntax and Note

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