Bdo dir Property - Get the text direction of the text inside a <bdo> element: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Bdo

Description

Bdo dir Property - Get the text direction of the text inside a <bdo> element:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p><bdo id="myBdo" dir="rtl">This paragraph will go right-to-left.</bdo></p>

<button onclick="myFunction()">get the text direction of the text inside the bdo element</button>

<p id="demo"></p>

<script>
function myFunction() {/*from w  w  w  . ja  v a2  s .  c om*/
    var x = document.getElementById("myBdo").dir;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials