a.createElement('div').style.cssText="someCssStyle"
This will return "someCssStyle" which will be given as argument to (a=document).getElementsByTagName('body')[0].appendChild(
function. So the div is never added. Can you see the problem here ?
You have to create the div, style it and then add it to the body. Like this
var div = document.createElement("div");
div.style.cssText = "someCssStyle";
document.body.appendChild(div);