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',
                          width:100,
                          sortable:true
                      },
                      
                      {
                          title:'姓名',
                          field:'name',
                          width:100,
                          sortable:true
                      },
                      
                      {
                          title:'密码',
                          field:'password',
                          width:100,
                      },
                      
                      {
                          title:'年龄',
                          field:'age',
                          width:100,
                          sortable:true
                      },
                      
                      {
                          title:'地址',
                          field:'address',
                          width:100,
                      },
                      
                      {
                          title:'学历',
                          field:'education',
                          width:100,
                      },
                      
                      {
                          title:'身份证号',
                          field:'identity',
                          width:100,
                      },
                      {
                          title:'手机',
                          field:'phon',
                          width:100,
                      },
                      
                      {
                          title:'单位名称',
                          field:'unitname',
                          width:100,
                      },
                      
                      {
                          title:'单位地址',
                          field:'unitaddress',
                          width:100,
                      },
                      
                      {
                          title:'注册时间',
                          field:'createDate',
                          width:100,
                      },
                      
                      {
                          title:'状态',
                          field:'status',
                          width:100,
                      },
                      
                      {
                          title:'上次修改时间',
                          field:'modificationTime',
                          width:100,
                      },
                      
                      {
                          title:'上传文件',
                          field:'uploadFile',
                          width:100,
                      },
                      
                      {
                          title:'ip',
                          field:'ip',
                          width: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="width: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="width:100%;height:100%;margin:0px 0px;"></iframe>'  
                    }  
                }]
            }];

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

 

posted @ 2017-09-27 11:37  xh_Blog  阅读(258)  评论(0编辑  收藏  举报