- document.body.innerHTML =
- '<div id="graph" style="width: 640px; height: 480px;"></div>' +
- '</div>';
- var graph = document.getElementById("graph");
+ var graph = document.getElementById('graph');
+ graph.setAttribute('style', 'width: 640px; height: 480px;');