jqgrid 余分なモノをなくした単純なタイプ
- <!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">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>jqgrid 余分なモノをなくした単純なタイプ</title>
- <link rel="stylesheet" type="text/css" href="jqgrid/jquery-ui-1.8.19.custom.css" />
- <link rel="stylesheet" type="text/css" href="jqgrid/ui.jqgrid.css" />
- <script type="text/javascript" src="jqgrid/jquery-1.7.2.min.js"></script>
- <script type="text/javascript" src="jqgrid/jquery-ui-1.8.19.custom.min.js"></script>
- <script type="text/javascript" src="jqgrid/jquery.jqGrid.min.js" ></script>
- <script type="text/javascript">
- jQuery(document).ready(function()
- {
- var mydata = [
- {id: 1, item: "ねぎ間", price: 168},
- {id: 2, item: "ハツ", price: 136},
- {id: 3, item: "レバー", price: 136},
- {id: 4, item: "ぼんちり", price: 136},
- {id: 5, item: "はらみ", price: 136},
- {id: 6, item: "うずら玉子", price: 136},
- {id: 7, item: "なんこつ", price: 136},
- {id: 8, item: "手羽先", price: 168},
- {id: 9, item: "せせり", price: 136},
- {id: 10, item: "白レバー", price: 168},
- {id: 11, item: "丸ごとシマウマ", price: 290}
- ];
- jQuery("#list").jqGrid(
- {
- data: mydata,
- datatype: "local",
- colNames:['番号', '品名', '金額'],
- colModel:[
- {
- index : 'id',
- name : 'id',
- sorttype : 'int'
- },
- {
- index : 'item',
- name : 'item',
- sorttype : 'str'
- },
- {
- index : 'price',
- name : 'price',
- sorttype : 'int'
- },
- ],
- height : 'auto',
- sortname : 'id',
- sortorder : "ASC",
- multiselect : false,
- caption : '焼き鳥一覧'
- });
- });
- </script>
- </head>
- <body>
- <h1>jqgrid 余分なモノをなくした単純なタイプ</h1>
- <table id="list" class="scroll"></table>
- <hr />
- <a href="//tips.recatnap.info/sample/jqgrid/jqgrid.zip" style="font-size:10pt;">使用しているCSSとライブラリと画像のzipファイル</a>
- <div style="font-size:10pt;text-align:right;margin-top:0.5em;">
- <a href="//tips.recatnap.info/" target="_top">PCスキルの小技・忘却防止メモ</a> -
- <a href="//tips.recatnap.info/wiki/" target="_top">PCスキルの小技・忘却防止メモのまとめ(wiki)</a>
- </div>
- <div style="font-size:10pt;text-align:center;margin-top:0.5em;padding:0.5em;border-top:1px solid #ccc;">
- Copyright © 2009 by PCスキルの小技・忘却防止メモ. All rights reserved.
- </div>
- </body>
- </html>