title: How to change the value of id or name?
body: <p>Example:</p>
  
  <pre><code>&lt;table id ='table'&gt;
  &lt;tr&gt;
  &lt;td&gt;1&lt;/td&gt;
  &lt;td&gt;&lt;select id='old' name='old'&gt;&lt;/select&gt;&lt;/td&gt;
  &lt;td&gt;&lt;select id='old2' name='old2'&gt;&lt;/select&gt;&lt;/td&gt;
  &lt;td&gt;&lt;div id='old3' name='old3'&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>How to change the value of id or name</strong> from select id ='<em>old</em>' to select id ='<em>new</em>' (for example) after deleting rows in javascript?
  I have been trying all the methods like trying getElementById('old') = 'new' but not work, used replaceChild also not work (or maybe I put the wrong code, no idea).
  Do you have other alternatives? (No JQuery, please).</p>
  
  <p>Thanks.</p>