title: How to write the saveTable function?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function createTable(){
      var _table = document.getElementById("test");
      var newRow = _table.insertRow(1);
      var cell0 = newRow.insertCell(0);
      var cell1 = newRow.insertCell(1);
      cell0.innerHTML = "x";
      cell1.innerHTML = 60;
      }
  
  function saveTable(){
     document.execCommand("saveas",,"/tmp/test.html");
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt;to create my table&lt;/p&gt;
  &lt;input type="button" value="to create new table" onclick="createTable()" /&gt;
  &lt;input type="button" value="to save table as /tmp/test.html" oncilck="saveTable()" /&gt;
  &lt;table id="test" bodrder=1px&gt;
  &lt;tr&gt;
      &lt;td&gt;f1&lt;/td&gt;
      &lt;td&gt;f2&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>when the table was created by function createTable,i want to get a file /tmp/test.html whose content is as following </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table id="test"&gt;
  &lt;tr&gt;
  &lt;td&gt;f1&lt;/td&gt;
  &lt;td&gt;f2&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;x&lt;/td&gt;
  &lt;td&gt;60&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How to fulfil my saveTable function to do the job?</p>