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");
}
<p>to create my table</p>
<input type="button" value="to create new table" onclick="createTable()" />
<input type="button" value="to save table as /tmp/test.html" oncilck="saveTable()" />
<table id="test" bodrder=1px>
<tr>
<td>f1</td>
<td>f2</td>
</tr>
</table>
when the table was created by function createTable,i want to get a file /tmp/test.html whose content is as following
<table id="test">
<tr>
<td>f1</td>
<td>f2</td>
</tr>
<tr>
<td>x</td>
<td>60</td>
</tr>
</table>
How to fulfil my saveTable function to do the job?