还要再连接数据库查询一遍?
function ExportExcel() {
var form2 = document.getElementById("excelForm");
var data = grid.getData();
var columns = grid.getBottomColumns();
function getColumns(columns) {
columns = columns.clone();
for (var i = columns.length - 1; i >= 0; i--) {
var column = columns;
if (!column.field) {
columns.removeAt(i);
} else if (!column.visible) {
columns.removeAt(i);
} else {
var c = { header: column.header, field: column.field };
columns = c;
}
}
return columns;
};
var columns = getColumns(columns);
var obj = {
data: data,
columns: columns
};
var dataJson = mini.encode(obj);
var postData = document.getElementById("postData");
postData.value = dataJson;
form2.submit();
}
我这样写只能获取当前页的数据啊作者: factory 时间: 2013-3-7 15:10:47
qingxiawawa 发表于 2013-3-7 15:04
还要再连接数据库查询一遍?
function ExportExcel() {
var form2 = document.getElementByI ...