1、datagrid 2次加载问题:

解决方案:<table id="DataGrid" class="easyui-datagrid"> 改为 <table id="DataGrid">

只需要在js中初始化datagrid即可

$(function(){
$('#list_data').datagrid({
iconCls:'icon-location',//图标
.................................

2、window 中表单 ajax提交问题:

            $.ajax({
cache: true,
type: "POST",
url: action,
data:$('#'+formId).serialize(),// 你的formid
async: false,
error: function(request) {
alert("Connection error");
},
success: function(data) {
if(data=='success'){
$('#w').window('close');//关闭添加框
}
if(data=='error'){
alertBox('错误信息','菜单添加失败,请稍后再试!','error');
}
}
});

3、select取值问题

js:

var s = document.getElementById("aa").value;

jquery则是:

var s = $("#aa").val();

用了js框架easyui之后(添加class="easyui-combobox"),就不能这么用了,

你会发现不管怎么取都只能取得第一个option的值,

经过仔细寻查,easyui应该是这样的:

var s = $("#aa").combobox("getValue");

4、datagrid

<th field="inDate" width="110" data-options="formatter:dateformater">入货时间</th>
<th field="status" width="110" data-options="formatter:function(val){if(val=='0')return '默认';if(val=='1')return '审核通过';if(val=='1')return '审核不通过';}">状态</th>
<th field="remark" width="110">备注</th>
<th width="110" data-options="field:'_operate',formatter:formatOper">操作</th>

对于时间类型的处理,用formatter

function dateformater(obj){
var date = obj.year+'-'+(obj.month+1)+'-'+obj.day;
//var date = obj.year+'-'+(obj.month+1)+'-'+obj.day+' '+obj.hours+':'+obj.minutes+':'+obj.seconds;
return date;
}

对于固定列eg:操作

field:'_operate'

easy-ui 使用总结的更多相关文章

  1. Struts2 easy UI插件

    一.easy UI是类似于jQuery UI的插件库,它提供了丰富的各种常用插件:tree.datagrid... tree插件: 语法:$(selector).tree([settings]); 常 ...

  2. Easy UI常用插件使用

    一.easy UI是类似于jQuery UI的插件库,它提供了丰富的各种常用插件:tree.datagrid... tree插件: 语法:$(selector).tree([settings]); 常 ...

  3. easy ui插件

    简介: easy UI是类似于jQuery UI的插件库 注意:多脚本同时使用时,注意脚本冲突问题. 常用插件: 1.tree插件(tree插件实现动态树形菜单) 2.datagrid插件(datag ...

  4. easy ui 框架

    Easy UI 准备工作(搭建) 1.在WebRoot 的目录下创建js 文件夹,在文件夹中倒入一下两个包 Jquery.easyui.min.js jquery.min.js 2.在WebRoot ...

  5. 解决easy ui 1.4datebox控件不能清空的问题

    用easy ui遇到这个问题,在网上找到了解决方案,不过是1.3.6版本的.现提供1.4版本的修改的具体位置和代码. 我们用的是这个 修改位置:12739行,添加代码: , { text: funct ...

  6. easy ui 1.4的NumberBox,失去焦点后不能再次输入小数点

    这也是1.4版本的bug,现在1.4.1也发布了,经验证,该问题在新版本中已经解决了 在网上找到的解决办法,地址:http://www.jeasyui.com/forum/index.php?topi ...

  7. ASP.MVC EASY UI 入门之 —— Tree & ComboTree

    1.常规的EASY UI的tree和comboTree代码基本是官方的DEMO都有的,虽然很简单,但是还是要实践的做一次,才能更清晰的了解和使用它!先上效果图 因为用的是code first,所以数据 ...

  8. 关于ExtJS、JQuery UI和easy UI的选择问题

    转自百度知道. 问:做企业级应用,比如***管理系统,不需要华丽的特效,只希望简单,风格统一.能用到的只有messagebox.tree.grid大概这几个,其他特效不要,忘大神根据自己的见解以及我这 ...

  9. Jquery easy UI 上中下三栏布局 分类: ASP.NET 2015-02-06 09:19 368人阅读 评论(0) 收藏

    效果图: 源代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://w ...

  10. Easy UI

    首先去Easy UI官网下载离线包 导入要用的js模块 <!DOCTYPE html> <html> <head lang="en"> < ...

随机推荐

  1. 深入理解Linux内核-虚拟文件系统

    Linux 成功的关键之一是它具有和其他操作系统和谐共存的能力 5个标准文件类型:1.普通文件2.目录文件3.符号链接文件4.设备文件5.管道文件 虚拟文件系统(Virtual FileSystem) ...

  2. 浅谈hibernate的sessionFactory和session

    一.hibernate是什么? Hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序员可以随心所欲的使用对象编程思维来操纵数据库. Hiber ...

  3. (转)Unity3d使用心得(2):Unity3d 动态下载动画资源——AnimationClip 的使用 - 斯玛特琦

    引言: 在使用 Unity3d 开发微端.或者网页游戏的时候常常须要将资源打包成 AssetBundle ,然后通过 www 的方式动态的下载资源.今天要分享的是我再动态下载 Animation 骨骼 ...

  4. git将本地项目添加到github上

    git init git add . git commit -m '添加备注' git add remote origin originUrl git push -u origin master 注意 ...

  5. Market Guide for AIOps Platforms

    AIOps platforms enhance IT operations through greater insights by combining big data, machine learni ...

  6. Fabric V1 交易的生命周期

    Fabric v1 Transaction Lifecycle1 Client application creates tran proposeal (chinacode function and a ...

  7. Vue.js使用-组件(下篇)

    上一节,我们定义了组件的基本使用,下面我们看看组件其他的一些特性. 1.组件作用域 同时在Vue对象和组件中定义一个属性,显示结果是怎样的呢? <!DOCTYPE html> <ht ...

  8. Vue之vuex实现简易计算器

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. LeetCode: Jump Game Total 解题报告

    Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of ...

  10. linux跑火车的命令sl

    http://forum.ubuntu.org.cn/viewtopic.php?t=250890 ubuntu下可以通过 apt-get install sl 安装.执行sl会出来什么呢?帖一下: ...