title: Insert multiple attributes into html tag using JavaScript and not between tags
body: <p>From a previous quest we asked about inserting a new attribute into a html tag and the code below does the job nicely, but how should it be coded to add multiple attributes, for example changing..</p>
  
  <pre><code>&lt;body bgcolor="#DDDDDD"&gt;
  </code></pre>
  
  <p>to...</p>
  
  <pre><code>&lt;body bgcolor="#DDDDDD" topmargin="0" leftmargin="0"&gt; 
  </code></pre>
  
  <p>The code that works for a single attribute is...</p>
  
  <pre><code>document.getElementsByTagName("body")[0].setAttribute("id", "something");
  </code></pre>
  
  <p>How to modify this for inserting multiple attributes?</p>