1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <html> <head> <title>product</title> <link rel="stylesheet" href="/layui/css/layui.css" media="all"> </head> <body> <table id="demo" lay-filter="test"></table>
<script src="/layui/layui.js"></script> <script> layui.use('table', function(){ var table = layui.table;
table.render({ elem: '#demo' ,height: 312 ,url: '${pageContext.request.contextPath}/product' ,page: true ,cols: [[ {field: 'pid', title: 'ID', width:80, sort: true, fixed: 'left'} ,{field: 'pname', title: '名称', width:80} ,{field: 'marketPrice', title: '标价', width:80, sort: true} ,{field: 'shopPrice', title: '实际价格', width:80} ,{field: 'pdate', title: '上柜日期', width: 177} ,{field: 'pdesc', title: '描述', width: 80, sort: true} ,{field: 'cid', title: '类型', width: 80, sort: true} ,{field: 'work', title: '职业', width: 80} ,{field: 'wealth', title: '财富', width: 135, sort: true} ]] }); }); </script> </body> </html>
|