Latest web development tutorials

HTML DOM Style unicodeBidi property

Style Object Reference Style Objects

Definition and Usage

unicodeBidi attributes and direction attributes used together to set or return whether the text has been rewritten to support multiple languages in the same document.

grammar

Setting unicodeBidi properties:

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

Back unicodeBidi properties:

Object.style.unicodeBidi

描述
normal 默认。不使用附加的嵌入层面。
embed 创建一个附加的嵌入层面。
bidi-override 创建一个附加的嵌入层面。重新排序取决于 direction 属性。
inherit unicodeBidi 属性的值从父元素继承。


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support unicodeBidi property.

Note: IE7 and earlier versions do not support the "inherit" value.IE8 only provides! DOCTYPE supported "inherit". IE9 support "inherit".


Examples

Examples

Cover text:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.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>

try it"


Style Object Reference Style Objects