jQuery MiniUI
标题:
form的bug,一加载页面就卡死
[打印本页]
作者:
weng_gh
时间:
2012-9-26 23:12:11
标题:
form的bug,一加载页面就卡死
<!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方法去掉,即不获取后面数据,一样会卡死
作者:
factory
时间:
2012-9-27 10:30:13
你贴的代码我测试了,没有出现卡死的现象.
你先测试下demo的form,看下你的本地是否会卡死
作者:
niko
时间:
2012-9-27 12:37:38
是否是firefox并开启了firebug。
firebug现在有此问题,关闭就可以了。
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2