<input value="LoadForm" type="button" onclick="loadForm()" />
<script type="text/javascript">
$(function () { loadForm(); }); //方法一:
//$(document).ready(function (e) { loadForm(); }); //方法二:
function loadForm() {
//加载表单数据
var form = new mini.Form("#form1");
$.ajax({
url: "../data/FormService.aspx?method=LoadData",
type: "post",
success: function (text) {
var data = mini.decode(text); //反序列化成对象
// form.setData(data); //设置多个控件数据
}
});
}
</script>