構文 | |
document.オブジェクト名.encoding
document.forms[インデックス].encoding |
|
| |
説明
- フォームデータのMINEエンコード値を持つプロパティ。
- 「application/x-www-form-urlencoded」といった値になる。
用例
フォームデータのMINEエンコード値を取得し書き出す。
注)以下変更あり
<form name="FOLM" action="http://cgi.hogehoge.jp/hoge.cgi"
method="post">
<b>お名前:</b><input type="text" name="namae" size=40><br>
<b>e-mail:</b><input type="text" name="email" size=45>
<p>
<input type="submit" name= "go" value="メールを送る">
<input type="reset" value="リセットする">
</p>
</form>
<hr>
<script type="text/javascript">
<!--
document.write("エンコード情報:",document.FOLM.encoding);
//-->
</script>
この用例を実行する