Create a Bdo Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Bdo


You can create a <bdo> element by using the document.createElement() method:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<button onclick="myFunction()">create a BDO element</button>

function myFunction() {//  ww w  .ja v a 2s .c  o  m
    var x = document.createElement("BDO");
    var t = document.createTextNode("This text will go right-to-left.");
    x.setAttribute("dir", "rtl");


Related Tutorials