- 注册时间
- 2012-9-12
- 最后登录
- 2013-2-16
- 阅读权限
- 10
- 积分
- 271
- 精华
- 0
- 帖子
- 60
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="../../scripts/boot.js" type="text/javascript"></script>
<style type="text/css">
html, body
{
font-size:12px;
padding:0;
margin:0;
border:0;
height:100%;
overflow:visible;
}
</style>
</head>
<body>
<form id="form1" method="post">
<input name="id" class="mini-hidden" />
<div style="padding-left:11px;padding-bottom:5px;">
<table style="table-layout:fixed;">
<tr>
<td style="width:70px;">姓名:</td>
<td style="width:150px;">
<input name="name" class="mini-textbox" />
</td>
<td style="width:70px;">单位:</td>
<td style="width:150px;">
<input name="company" class="mini-textbox" />
</td>
</tr>
<tr>
<td style="width:70px;">担任职务:</td>
<td style="width:150px;">
<input name="duty" class="mini-textbox" />
</td>
<td style="width:70px;">电子信箱:</td>
<td style="width:150px;">
<input name="email" class="mini-textbox" />
</td>
</tr>
</table>
</div>
</form>
<script type="text/javascript">
mini.parse();
var form = new mini.Form("form1");
//编辑
function SetData(data) {
if (data.action == "edit") {
//跨页面传递的数据对象,克隆后才可以安全使用
data = mini.clone(data);
$.ajax({
url: rootPath + "../../xx.do?method=load&id=" + data.id,
cache: false,
success: function (text) {
var o = mini.decode(text);
form.setData(o);
form.setChanged(false);
}
});
}
}
function GetData() {
var o = form.getData();
return o;
}
</script>
</body>
</html>
假如我把setdata方法去掉,即不获取后面数据,一样会卡死
|
|