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等问题,那就在跳转后的界面添加需要引入的文件

  • 相关阅读:
    SQL语句之奇形怪状的冷门函数
    计算累计收益
    关于SQL表字段值缺失的处理办法
    虚拟机移植到另一台机器
    分分钟搞懂rank() over(partition by)的使用
    分分钟搞懂union与union all
    【转】10分钟就能学会的.NET Core配置
    【转】依赖注入的威力,.NET Core的魅力:解决MVC视图中的中文被html编码的问题
    【转】Asp.Net Core2.0获取客户IP地址,及解决发布到Ubuntu服务器获取不到正确IP解决办法
    【转】在.net Core 中像以前那样的使用HttpContext.Current
  • 原文地址:https://www.cnblogs.com/xh_Blog/p/7600911.html
Copyright © 2011-2022 走看看