Javascript examples for DOM HTML Element:Bdo
Bdo dir Property - Get the text direction of the text inside a <bdo> element:
<!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>