title: How to remove or replace 'width' and 'height' attributes on the svg root use Javascript?
body: <p>There are files SVG that contain header information of the height and width in mm.</p>
  
  <pre><code>&lt;?xml  version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;!-- Creator: CorelDRAW X6 --&gt;
  &lt;svg xmlns="http://www.w3.org/2000/svg"  width="50.8mm"  height="55.0332mm"   version="1.1"   viewBox="0 0 5080 5503" /&gt;
  </code></pre>
  
  <p>I show these images through an object</p>
  
  <pre><code>&lt;div id="panel"&gt;
        &lt;object id="svg" class="group" data="none.svg" width="500" height="500"&gt;&lt;/object&gt;        
  &lt;/div&gt;
  
  var svg = document.getElementById('svg');
  svg.setAttribute('data', 'one.svg');
  </code></pre>
  
  <p>However, in some browsers, it appears not true.
  To solve this problem, I need to replace the height and width, assign them a value of 100%</p>
  
  <p>How to change a string using Javascript ?</p>
  
  <pre><code>width="50.8mm"  height="55.0332mm"
  </code></pre>
  
  <p>to</p>
  
  <pre><code>width="100%"  height="100%"
  </code></pre>
  
  <p>thank you</p>