jquery - How to get same aligment in Javascript? -


i trying add html code in javascript alignment , styling. searching on google 3 4 days not getting suitable answer. looking for? javascript code :

function readcookie() {   var ca = document.cookie.split('%');   alert(ca); }  function getcookie(cname) {   var name = cname + "=";   var ca = document.cookie.split(';');   for(var i=0; i<ca.length; i++)     {     var c = ca[i].trim();     if (c.indexof(name)==0) return c.substring(name.length,c.length);    } return ""; }  function checkcookie() { var user=getcookie("username"); var span =  document.getelementbyid("file_handle"); //span.innerhtml = ''; // clear existing if (user!="")   {  //document.getelementbyid('file_handle').innerhtml; // span.appendchild(user);  span.textcontent = user; // test case   }  } 

my output come in format:

but, want output comes in format

thank in advance

do mean alignment of html elements via jscript?

how add css using html dom


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -