JavaScript Reference/Javascript Properties/encoding

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

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



"encoding" is applied to

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



"encoding" Syntax and Note

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