jqGrid安装很简单,只需把相应的css、js文件加入到页面中即可。 
按照官网文档:

/myproject/css/ 
            ui.jqgrid.css 
            /ui-lightness/ 
                  /images/ 
                  jquery-ui-1.7.2.custom.css

 /myproject/js/ 
            /i18n/ 
                  grid.locale-bg.js 
                  list of all language files 
                  …. 
            Changes.txt 
            jquery-1.3.2.min.js 
            jquery.jqGrid.min.js

 

在页面中写法:

Java代码 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  

<head>  

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  

<title>My First Grid</title>  

   

<link rel="stylesheet" type="text/css" media="screen" href="css/ui-lightness/jquery-ui-1.7.1.custom.css" />  

<link rel="stylesheet" type="text/css" media="screen" href="js/src/css/ui.jqgrid.css" />  

<link rel="stylesheet" type="text/css" media="screen" href="js/src/css/jquery.searchFilter.css" />  

<style>  

html, body {  

   margin: 0;  

    padding: 0;  

    font-size: 75%;  

}  

</style>  

   

<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>  

<script src="js/src/grid.loader.js" type="text/javascript"></script>  

   

</head>  

<body>  

...  

</body>  

</html>  

需要说明的是,jquery-ui的字体大小与jqgrid字体大小不一致,故需要在页面上在加上一段 
style来指定页面上文字大小。

相关文章:

  • 2021-10-17
  • 2021-08-08
  • 2022-12-23
  • 2021-11-23
  • 2021-06-09
  • 2021-07-18
  • 2021-09-02
  • 2021-11-22
猜你喜欢
  • 2022-01-21
  • 2021-10-08
  • 2021-08-17
  • 2021-12-24
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案