What\'s the difference between:
var div = document.createElement(\'div\');//output -> [object HTMLDivElement] document.getElementById(\'container\').appe
appendChild is expecting an element so when you send it text, it doesn't know what to do. You might want to look into using a javascript library to ease some of that work, such as jQuery. Your code would be:
$('#container').append('');