SYNCERのロゴ
アイキャッチ画像

Document.inputEncoding - 文字エンコーディング

inputEncodingは、Documentのプロパティです。ドキュメントの文字エンコーディングを返します。このプロパティは歴史的な理由で残されています。代わりにcharacterSetを使って下さい。

このAPIは非推奨です。新しくコードに加えず、代わりの手段を探して下さい。

概要

名前
inputEncoding
所属
Document
IDL
readonly attribute DOMString inputEncoding; // historical alias of .characterSet
仕様書
https://dom.spec.whatwg.org/#dom-document-inputencoding

説明

文字エンコーディングを返す。読み取り専用なので、値を代入して変更することはできない。

デモ

Document.inputEncodingのデモです。

<!-- このコードは編集できます。 -->

<!DOCTYPE html>
<html>
<body>
<script>
var value = document.inputEncoding ;

console.log( value ) ;
document.body.appendChild( new Text( value ) ) ;
</script>
</body>
</html>

サポート状況

ChromeFirefoxSafariEdgeIEOperaiOS SafariAndroid
9+ 15+
  • Twitterでシェア
  • Facebookでシェア
  • Google+でシェア
  • はてなブックマークでシェア
  • pocketに保存
  • LINEでシェア
更新履歴
2017年10月5日 (木)
コンテンツを公開しました。