See using jquery or javascript you can call webmethod which is a ajax call to the server.In that webmethod you can fetch the data and keep the table in dataset and return ds.GetXml() from that webmethod.
and you will get table(s) in your javascript and then you can do whatever you want with that data.
use $.ajax
use this as your reference.
Here getUnitsViewTable is a webmethod
var getUnitsViewTable = function () {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "AHUDialog.aspx/getUnitsViewTable",
data: "{}",
dataType: "json",
complete: function (jqXHR) {
var returnedData = JSON.parse(jqXHR.responseText).d;
var xmlDoc = $.parseXML(returnedData);
var xml = $(xmlDoc);
var tableData = xml.find("Table");
var str = "";
unitsTable = $(document.createElement('table'));
str += "<tbody><tr><th>B</th><th>Model</th></tr>"
$(tableData).each(function () {
str += "<tr>";
str += "<td>" + $(this).find('B').text() + "</td>";
str += "<td>" + $(this).find('Model').text() + "</td>";
str += "</tr>";
});
str += "</tbody>";
unitsTable.append(str);
}
});
}