title: Is using `innerHTML` the only way to create a `button` element in JavaScript with the `type` attribute?
body: <p>I wanted to make a button with the following JavaScript...</p>
  
  <pre><code>var button = document.createElement('button');
  button.type = 'button';
  button.appendChild(document.createTextNode('I am button'));
  document.body.appendChild(button);
  </code></pre>
  
  <p>It works great, <strong>except in IE7/8</strong> (all I have tested so far).</p>
  
  <blockquote>
    <p>Message: <code>Object doesn't support this action</code><br /> Line: <code>185</code><br />
    Char: <code>9</code><br /> Code: <code>0</code><br /> URI: <code>http://example.com/widget.js</code></p>
  </blockquote>
  
  <p>I found a workaround...</p>
  
  <pre><code>document.body.innerHTML = '&lt;button type="button"&gt;I am button&lt;/button&gt;';
  </code></pre>
  
  <p>That is, set <code>innerHTML</code> and let the browser do the parsing.</p>
  
  <p><a href="http://jsfiddle.net/PRCLv/" rel="nofollow">jsFiddle</a>.</p>
  
  <p>Is there any other way to get this to work in IE without setting the <code>innerHTML</code> property?</p>