JavaScript Reference/Javascript Properties/acceptCharset
Версия от 18:30, 25 мая 2010; (обсуждение)
"acceptCharset" Example
<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>
"acceptCharset" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<form> |
+----------------+--------------------------------------------------------------+
"acceptCharset" Syntax and Note
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