jquery easyui的方法参数
1.form 表单的参数有:submit,validate,clear,load
2.submit 例如:
$('#goods-add').form('submit', {
url : url,
onSubmit : function() {
return $(this).form('validate');
},
success : function(result) {
result = eval("(" + result + ")");
if (!result.success) {
$.messager.alert('出错了', result.message, 'error');
} else {
$('#wow-goods-add').dialog('close');
$('#wow-goods-dg').datagrid('reload');
$.messager.show({
title : '提示',
msg : '操作完成!'
});
}
}
});
onSubmit是提交表单前验证,返回true或false 3.validate例子:
onSubmit : function() {
return $(this).form('validate');
},
4.clear清除表单的数据:
$('#goods-add').form('clear');
5.load例子:
把数据加载到form表单中,不用输入
var row = $("#wow-goods-dg").datagrid("getSelected");
$('#goods-add').form('load', row);
console.info(object) 是把结果输出到控制台
eval("("+result+")") 是把result字符串转换成json,字符串格式是:{'':'',}单引号或者{"":""}双引号都行
另一种转换成json字符串的方式:(字符串格式要求严格{"":""},必须是双引号的)$.parseJSON(result);
JSON.parse 函数比 eval 函数更为安全且执行速度更快。
jquery easyui的方法参数的更多相关文章
- jQuery中$.ajax()方法参数解析
本文实例为大家讲解了jQuery $.ajax()方法参数,供大家参考,具体内容如下 $.ajax({ url:'test.do', data:{id:123,name:'xiaoming'}, ty ...
- JQuery中$.ajax()方法参数详解
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如put和 ...
- JQuery中$.ajax()方法参数详解 及 async属性说明
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如put和 ...
- JQuery中$.ajax()方法参数详解(转载)
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如put和 ...
- JQuery中$.ajax()方法参数都有哪些?
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如put和 ...
- 转:JQuery中$.ajax()方法参数详解
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如put和 ...
- JQuery中$.ajax()方法参数
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如put和 ...
- (转)JQuery中$.ajax()方法参数详解
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如put和 ...
- Jquery中$.ajax()方法参数详解(转)
转自:http://blog.sina.com.cn/doctor830619 url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数, ...
随机推荐
- R: count number of distinct values in a vector
numbers <- c(4,23,4,23,5,43,54,56,657,67,67,435, 453,435,324,34,456,56,567,65,34,435) a & ...
- 发布 windows 10 universal app 时微软账号验证失败
具体错误:Visual Studio encountered an unexpected network error and can't contact the Microsoft account s ...
- iOS开发:Swift多线程NSThread的使用
一:创建线程,NSThread创建线程常用的三种方式: //1:手动创建启动 let thread:NSThread = NSThread(target: self, selector:"d ...
- bzoj1863: [Zjoi2006]trouble 皇帝的烦恼
白书原题.l边界又设错啦.一般都是错这里吧.注意为什么这里不能是l=0.(只是为了判断第一个和最后一个 #include<cstdio> #include<cstring> # ...
- BZOJ1048: [HAOI2007]分割矩阵
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1048 题解:搞清题意之后来个记忆化爆搜就行了. 代码: #include<cstdio& ...
- OK335xS PMIC(TPS65910A3A1RSL) reset
/*********************************************************************** * OK335xS PMIC(TPS65910A3A1 ...
- LeetCode: Reverse Words in a String && Rotate Array
Title: Given an input string, reverse the string word by word. For example,Given s = "the sky i ...
- Android 仿百度网页音乐播放器圆形图片转圈播放效果
百度网页音乐播放器的效果 如下 : http://www.baidu.com/baidu?word=%E4%B8%80%E7%9B%B4%E5%BE%88%E5%AE%89%E9%9D%99& ...
- Oracle中将小数转换成字符丢零.截取小数.除数为零解决法
如下所示,前面少个0 SQL>select money from users where username ='LEI'; money --------- .3256 解决方法: SQL> ...
- Banner 广告设计技巧及经验(转自UI中国)
经常听到banner这个词,但是banner是什么意思呢?引用百度知道的解释:banner可以作为网站页面的横幅广告,也可以作为游行活动时用的旗帜,还可以是报纸杂志上的大标题.Banner主要体现中心 ...