zoukankan      html  css  js  c++  java
  • jquery_EasyUI使用细节注意

    一、属性key不加双引号,value加双引号,对于url的value,添加‘’单引号;url的访问地址可以使用以下格式:

    datagrid中的url格式:

    var datagrid;
        $(function(){
            datagrid = $('#datagrid').datagrid({
                url : '<%= request.getContextPath()%>/userController/list.do',
                toolbar : '#toolbar',
                title : '用户列表',
                iconCls : '',
                pagination : true,
                pageSize : 10,
                pageList : [ 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ],
                fit : true,
                fitColumns : true,
                nowrap : false,
                border : false,
                idField : 'id',
                columns:[[
                          {
                              title:'编号',
                              field:'id',
                              100,
                              sortable:true
                          },
                          
                          {
                              title:'姓名',
                              field:'name',
                              100,
                              sortable:true
                          },
                          
                          {
                              title:'密码',
                              field:'password',
                              100,
                          },
                          
                          {
                              title:'年龄',
                              field:'age',
                              100,
                              sortable:true
                          },
                          
                          {
                              title:'地址',
                              field:'address',
                              100,
                          },
                          
                          {
                              title:'学历',
                              field:'education',
                              100,
                          },
                          
                          {
                              title:'身份证号',
                              field:'identity',
                              100,
                          },
                          {
                              title:'手机',
                              field:'phon',
                              100,
                          },
                          
                          {
                              title:'单位名称',
                              field:'unitname',
                              100,
                          },
                          
                          {
                              title:'单位地址',
                              field:'unitaddress',
                              100,
                          },
                          
                          {
                              title:'注册时间',
                              field:'createDate',
                              100,
                          },
                          
                          {
                              title:'状态',
                              field:'status',
                              100,
                          },
                          
                          {
                              title:'上次修改时间',
                              field:'modificationTime',
                              100,
                          },
                          
                          {
                              title:'上传文件',
                              field:'uploadFile',
                              100,
                          },
                          
                          {
                              title:'ip',
                              field:'ip',
                              100,
                          }
                          ]],
                          toolbar:[
                          {
                              text:'增加',
                              iconCls:'icon-add',
                              handler:function(){
                                  
                                }
                          },'-',
                          {
                              text:'删除',
                              iconCls:'icon-remove',
                              handler:function(){
                                  
                                }
                          },
                          '-',
                          {
                              text:'修改',
                              iconCls:'icon-edit',
                              handler:function(){
                                  
                                }
                          },
                          '-',
                          {
                              text:'查询',
                              iconCls:'icon-search',
                              handler:function(){
                                  
                                }
                          }
                          ]
            });
        });

    easyui的tree需要的添加json格式的变量中的url的格式:

    var treeData=[{
                    id: "dispatchingManagement",
                    text: "调度管理",
                    state: "closed",
                    children: [{
                        id: "taskcenter",
                        text: "任务中心",
                        attributes : {  
                            url:'<iframe width="100%" height="100%" frameborder="0"  src="<%= request.getContextPath()%>/userController.do?hh" style="100%;height:100%;margin:0px 0px;"></iframe>'   
                        }
                    }, {
                        id: "programmeApproval",
                        text: "方案审批",
                        attributes : {  
                            url:""  
                        }
                    }]
                }, {
                    text: "用户管理",
                    state: "closed",
                    children: [{
                        id: "yhgl",
                        text: "用户管理",
                        attributes: {  
                            url : '<iframe width="100%" height="100%" frameborder="0"  src="<%= request.getContextPath()%>/userController.do?center" style="100%;height:100%;margin:0px 0px;"></iframe>'  
                        }  
                    }]
                }];

    二、url访问注意地址跳转否?若跳转后报$ is not defind等问题,那就在跳转后的界面添加需要引入的文件

  • 相关阅读:
    Phoenix SQL总结
    awk基本用法
    集群性能调优-速度篇
    集群基准性能测试
    服务器基础环境搭建
    kafka命令行操作
    九、spring boot--JPA实现分页和枚举转换
    八、spring boot--mybatis框架实现分页和枚举转换
    七、spring boot开发web应用--mybatis-plus框架实现分页和枚举转换
    六、spring boot开发web应用--mybatis-plus为简化而生
  • 原文地址:https://www.cnblogs.com/xh_Blog/p/7600911.html
Copyright © 2011-2022 走看看