Style unicodeBidiプロパティ

Style 对象参考手册Style オブジェクト

定義と使い方

unicodeBidi プロパティはdirectionプロパティと一緒に使用され、テキストが書き換えられるかどうかを設定または返します。これにより、同じドキュメント内で複数の言語をサポートできます。

構文

unicodeBidi プロパティを設定する:

Object.style.unicodeBidi="normal|embed|bidi-override|inherit"

unicodeBidi プロパティを返す:

Object.style.unicodeBidi

值 説明
normal デフォルト。追加の埋め込みレベルを使用しません。
embed 追加の埋め込みレベルを作成します。
bidi-override 追加の埋め込みレベルを作成します。並べ替えは direction プロパティに依存します。
inherit unicodeBidi プロパティの値は親要素から継承されます。


ブラウザサポート

Internet ExplorerFirefoxOperaGoogle ChromeSafari

すべての主要ブラウザは unicodeBidi プロパティをサポートしています。

注意:IE7 およびそれ以前のバージョンは "inherit" 値をサポートしていません。IE8 は !DOCTYPE が指定されている場合のみ "inherit" をサポートします。IE9 は "inherit" をサポートします。


例

例

テキストを上書き:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>サンプル(example.com)</title>
<script>
function displayResult(){
    document.getElementById("p1").style.unicodeBidi="bidi-override";
}
</script>
</head>
<body>

<p>これはいくつかのテキストです。</p>
<p id="p1" style="direction:rtl">これは別のテキストです。</p>
<br>
<button type="button" onclick="displayResult()">テキストを上書き</button>

</body>
</html>

試してみる »


Style 对象参考手册Style オブジェクト その他の拡張