jqGrid不支持此属性或方法

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   
    <title>My JSP eg starting page</title>
   
<link rel="stylesheet" type="text/css" href="jqGrid/themes/basic/grid.css">
<link rel="stylesheet" type="text/css" href="jqGrid/themes/jqModal.css">

<script type="text/javascript" src="jqGrid/jquery.js"></script>
<script type="text/javascript" src="jqGrid/js/jquery.jqGrid.js"></script>
<script type="text/javascript" src="jqGrid/js/jqModal.js"></script>
<script type="text/javascript" src="jqGrid/js/jqDnR.js"></script>

<script type="text/javascript">
$(document).ready(function(){
$('#grid').jqGrid({
        url:'getJson.htm',
        datatype:'json',
        mtype:'POST',
        colNames:['id','name','age'],
        colModel :[
        {name:'id',index:'id', width:60},
        {name:'name',index:'name', width:60},
        {name:'age',index:'age', width:60}
        ],
        jsonReader:{
        root: "rows",
        page: "page",
        total: "total",
        records: "records",
        cell: "cell"
        },
        pager: 'nav',
        rowNum:10,
        rowList:[10,20,30],
        sortname:'id',
        sortorder:"desc",
        viewrecords:true,
        imgpath:'jqGrid/themes/basic/images',
        caption:'用户管理',
        multiselect:true,
        loadonce:true
 
    });  
    //定义按键  
    $('#grid').navGrid('#nav',{refresh: true,edit: true, add: true,del: true,search: true});  
 
}); 
   
</script>
  </head>
 
  <body>
    This is my JSP page. <br>
<table id="grid" class="scroll"></table> 
    <div id="nav" class="scroll"></div> 

  </body>
</html>


注:
老是报jqGrid 无效的属性 是怎么回事?

脚本文件都测试过,引入没有问题。

你可能感兴趣的:(jquery,jsp,json,脚本,配置管理)