Javascript examples for DOM HTML Element:Bdo
You can create a <bdo> element by using the document.createElement() method:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">create a BDO element</button> <script> 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"); x.appendChild(t); document.body.appendChild(x); } </script> </body> </html>