在jsp页面是这么引用的
<script language="javascript" type="text/javascript" src="${contextPath}/script/jquery-ui-1.8.21.custom.min.js"></script> 
<link rel="stylesheet" type="text/css" href="${contextPath}/css/jquery-ui-1.8.21.custom.css" />
项目用到的js有:jquery1.7.2, jquery grid 1.8.21, dtree, ajaxfileupload, json在firebug看,jquery-ui-1.8.21.custom.css里面所有的图片都找到了,就是不显示样式 所有窗体都是透明的,
在CSS里把需要的图片路径改成错的,反而有那个默认的灰色的样式了

解决方案 »

  1.   

    $("#infoList").jqGrid({
        url:'${contextPath }/cms/content/get',
        datatype:"json",
        mtype:'GET',
        colNames:['编号','地区编号','地区名称','所属城市编号','修改','删除'],
        colModel:[
            {name:'id',index:'id',width:55},
            {name:'title',index:'title',width:100},
            {name:'content',index:'content',width:180, sortable:false},
            {name:'brief',index:'brief',width:180},
            {name:'Modify',index:'Id',width:80,align:"center",sortable:false},
                {name:'Delete',index:'Id',width:80,align:'center',sortable:false}
        ],
        //autowidth:true,
        jsonReader:{
            page:"page",
            total:"total",
            repeatitems:false
        },
        pager:jQuery('#pager1'),
        rowNum:10,
        rowList:[10,20,30],
        sortname:'id',
        sortorder:'desc',
        viewrecords:true,
        caption:'',
        gridComplete:function(){  //在此事件中循环为每一行添加修改和删除链接
                var ids=jQuery("#infoList").jqGrid('getDataIDs');
                for(var i=0; i<ids.length; i++){
                    var id=ids[i];   
                    modify = "<a href='#' style='color:#f60' onclick='Modify(" + id + ")'>修改</a>";  //这里的onclick就是调用了上面的javascript函数 Modify(id)
                    del = "<a href='#'  style='color:#f60' onclick='Delete(" + id + ")' >删除</a>";   
                    jQuery("#infoList").jqGrid('setRowData', ids[i], { Modify: modify, Delete: del });
                }
            }
    }).navGrid("#pager1",{edit:false,add:false,del:false,search:false});

    });就是这么调用的