方式二:使用Ajax提交表单
//提交表单数据
var form = new mini.Form("#form1");
var data = form.getData(); //获取表单多个控件的数据
var json = mini.encode(data); //序列化成JSON
$.ajax({
url: "../data/FormService.aspx?method=SaveData",
type: "post",
data: { submitData: json },
success: function (text) {
alert("提交成功,返回结果:" + text);
}
});
服务端处理:
//获取提交的数据
String submitJSON = Request["submitData"];
Hashtable data = (Hashtable)PluSoft.Utils.JSON.Decode(submitJSON);
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) | Powered by Discuz! X2 |