把var editForm = document.getElementById("editForm1"); 定义放到下面的函数中
function onShowRowDetail(e) {
var row = e.record;
//将editForm元素,加入行详细单元格内
var td = grid.getRowDetailCellEl(row);
var editForm = document.getElementById("editForm1");
td.appendChild(editForm);
editForm.style.display = "";
//表单加载员工信息
var form = new mini.Form("editForm1");
if (grid.isNewRow(row)) {
form.reset();
} else {
grid.loading();
$.ajax({
url: "../data/AjaxService.aspx?method=GetEmployee&id=" + row.id,
success: function (text) {
var o = mini.decode(text);
form.setData(o);