Hi
var div = document.createElement('div');
div.id = 'window';
var div2 = document.createElement('div');
div2.id = 'windowhead';
var span1 = document.createElement('span');
span1.id = 'name';
div2.appendChild(span1);
var div3 = document.createElement('div');
div3.id = ('close');
div2.appendChild('div3');
div.appendChild(div2);
document.body.appendChild(div);
Can someone tell me why chorme console is giving me this error :
Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.