Java高级架构师,一第16节:Mybatis动态查询和Json自动拼装

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link href="${pageContext.request.contextPath}/static/css/application.css" rel="stylesheet">
<script src="${pageContext.request.contextPath}/static/js/jquery-1.11.0.js"></script>
</head>
<body>
<script type="text/javascript">
        $().ready(function(){
                $("#btn_query").click(function(){
                        
                    var json = '{"customerId":"'+$("#customerId").val()+'"'+
                               ',"pwd":"'+$("#pwd").val()+'"'+
                               ',"showName":"'+$("#showName").val()+'"'+
                               ',"trueName":"'+$("#trueName").val()+'"'+
                               '}';     
                        window.location.href = "${pageContext.request.contextPath}/customer/toList?queryJsonStr="+json;
                });             
        });
</script>

<table width="100%"  cellpadding="0" cellspacing="1" class="tableLine">
        <tr>
                <td colspan=4 align=center class="tableLineBg">客户查询</td>
        </tr>
        <tr>
                <td>客户编号</td>
                <td><input type="text" ></td>
                <td>客户密码</td>
                <td><input type="text" ></td>
        </tr>
        <tr>
                <td>显示名称</td>
                <td><input type="text" ></td>                 
                <td>真实姓名</td>
                <td><input type="text" ></td>
        </tr>             
        <tr>
                <td colspan=4 align=center><input ></td>
        </tr>
</table>

</body>
</html>