Javascript: Expected Identifier : <p>I am creating an HTML document and using javascript to create an image element.
Here is my code (create is already defined):</p>

<pre><code>create=document.createElement("img");
create.src = 'data/1.png';
create.alt = 'image1';
create.style.magin = '1px';
eval("create.id = 'image" + count + "'");
create.class = 'block'; // line that breaks the code
document.body.appendChild(create);
</code></pre>

<p>I don't know what's going wrong here, but it's probably something obvious. Does anyone have any ideas?</p>
